{'error': {'message': 'Cannot specify both model and engine', 'type': 'invalid_request_error', 'param': None, 'code': None}}
Has anybody had this error? I am trying to connect via the API using a python script and in my params I have specified the text-davinci-002 model. I have tried several different models and tried running it on a different machine but I still get the same error.
#{'error': {'message': 'Cannot specify both model and engine', 'type': 'invalid_request_error', 'para
38 messages · Page 1 of 1 (latest)
Your URL is maybe wrong
Please look in the Documentation. There you can find all URLs that works well
URL for the API endpoint?
Yes. The URL must be incorrect
api_endpoint = 'https://api.openai.com/v1/engines/davinci/completions' ?
Yes this is not correct
The correct URL is called https://api.openai.com/v1/completions
'Cannot specify both model and engine' U select the model and the engine davinci together, but this is wrong
U need to select your model with the parameter
and not with the url
Yes thats right, you need to use https://api.openai.com/v1/completions, and pass a parameter named model in the body of the request, look at the documentation for all the other required fields 🙂
@tardy frigateChatGPT is saying all the time the wrong API URL.
Yeah, it's using outdated data 😦
I think that /engines/davinci used to be the old endpoint and it hasnt learned enough of the new data yet
@tardy frigateWhat is with a ChatGPT API ?
The ChatGPT API is not released to the public yet, but it is coming soon
Okay this is good. I hope please with a fair PayWall ?
Thanks, there is progress now!
The message I received back doesnt seem to be sensical however.
Give the jason output and we can look
{'id': 'cmpl-6cdbVjGfXN45GrR5ENvM8o7RiB0fF', 'object': 'text_completion', 'created': 1674666721, 'model': 'text-davinci-002', 'choices': [{'text': '\n2020-03-31 00:00:00-04:00 64', 'index': 0, 'logprobs': None, 'finish_reason': 'stop'}], 'usage': {'prompt_tokens': 2951, 'completion_tokens': 17, 'total_tokens': 2968}}
U must get an answer
What do you mean?
Do u get now a answer?
That is all i get as a response
In which language do you code?
This is the answer from davinci 002: [{'text': '\n2020-03-31 00:00:00-04:00 64'
I see. It seems it didnt know how to interpret the data
Ok
But it cost more
Cost... right. I have to check how many tokens I get
Are we charged for the inputs that we send in our prompts to ChatGPT? Like if I send the entire encyclopedia britannica in every prompt, will I get charged for each word?