#{'error': {'message': 'Cannot specify both model and engine', 'type': 'invalid_request_error', 'para

38 messages · Page 1 of 1 (latest)

crystal compass
#

{'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.

fringe pasture
#

Your URL is maybe wrong

#

Please look in the Documentation. There you can find all URLs that works well

crystal compass
fringe pasture
#

Yes. The URL must be incorrect

fringe pasture
#

Yes this is not correct

#

'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

tardy frigate
#

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 🙂

fringe pasture
#

@tardy frigateChatGPT is saying all the time the wrong API URL.

tardy frigate
#

I think that /engines/davinci used to be the old endpoint and it hasnt learned enough of the new data yet

fringe pasture
#

@tardy frigateWhat is with a ChatGPT API ?

tardy frigate
#

The ChatGPT API is not released to the public yet, but it is coming soon

fringe pasture
crystal compass
#

The message I received back doesnt seem to be sensical however.

fringe pasture
#

Give the jason output and we can look

crystal compass
#

{'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}}

fringe pasture
#

U must get an answer

crystal compass
fringe pasture
#

Do u get now a answer?

crystal compass
#

That is all i get as a response

fringe pasture
#

In which language do you code?

crystal compass
#

this is in python

#

but i am outputting my response as json

fringe pasture
#

This is the answer from davinci 002: [{'text': '\n2020-03-31 00:00:00-04:00 64'

crystal compass
#

I see. It seems it didnt know how to interpret the data

fringe pasture
#

Yeah this might be cause u use davinci 002

#

Use davinci 003

crystal compass
#

Ok

fringe pasture
#

But it cost more

crystal compass
#

Cost... right. I have to check how many tokens I get

crystal compass
#

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?