I wrote a small c# program to access text-davinci-002 and when I ran it I got a 404 error in response. I then tried a more direct approach and used POSTMAN to submit my GET request:
I verified the outbound using Fiddler4 and I even asked chatgpt if my url was correct (it said yes) and I do have a valid APIKey.
When I did a ping of the url I got timeouts?
and this whether on or off vpn.
My question is, is that the right base url (api.openai.com) or should I use something else? If it was authentication or a bad syntax I figure I get a different error. The c# code for the request I got from chatGPT so maybe it is outdated?
Well, that was embarrassing, but then not that far off from some of the answers I may read on stackoverflow at times. perhaps what is slightly frustrating are that the examples are only for node.js and python. I should have c# web requests coding memorized by now, but as a data integrator just coming off SOAP, it is not build in yet. Let’s see if I can get this working now.
(Also, I normally don’t like to ask it “Please write me code I should understand”, but I was trying to save time).
I still think, man that seemed so right (lol). Okay, using POSTMAN I get that the body is JSON established parameters. I have the body set to application/json and I am sending this:
{ “model”: “text-davinci-002”,
“prompt”: “What is the best tempurature for baking short bread cookies”,
“max_tokens”: 100,
“temperature”: .5,
“n”: 1,
“stream”: false,
“logprobs”: null,
“stop”: “\n”
}
My response is this:
{
“error”: {
“message”: “you must provide a model parameter”,
“type”: “invalid_request_error”,
“param”: null,
“code”: null
}
}
{
“model”: “text-davinci-002”,
“prompt”: “What is the best tempurature for baking short bread cookies”,
“max_tokens”: 100,
“temperature”: .5,
“n”: 1,
“stream”: false,
“logprobs”: null,
“stop”: “\n”
}
I can get a list of models, 002 is in the list. If I can get this working in POSTMAN translating it to c# is no issue. I fell like I am missing something from the documentation.
Creates a completion for the provided prompt and parameters
(Seems I cannot read after 40+ years programming. Actually I’m just frustrated and was rushing)
I did get a response, but
{
“error”: {
“message”: “You exceeded your current quota, please check your plan and billing details.”,
“type”: “insufficient_quota”,
“param”: null,
“code”: null
}
}
I guess I need to read up on what that means now though is seems like am Amazon throttling thing. Thank you for your guidance.