openai-node icon indicating copy to clipboard operation
openai-node copied to clipboard

You requested a model that is not compatible with this engine

Open gzgogo opened this issue 3 years ago • 3 comments

Describe the bug

You requested a model that is not compatible with this engine

To Reproduce

i meet a error: "You requested a model that is not compatible with this engine" yesterday, but it can run normally before

Code snippets

const response = await openai.createCompletion({
      model: 'text-davinci-003',
      prompt: prompt,
      temperature: 0.7, 
      top_p: 1,
      max_tokens: 4000,
      frequency_penalty: 0.0,
      presence_penalty: 0.6,
      stop: [' Human:', ' AI:'],
    })

OS

macos

Node version

node v18

Library version

openai 3.1.0

gzgogo avatar Feb 06 '23 00:02 gzgogo

I have the same error but with python

liseri avatar Feb 06 '23 11:02 liseri

try to switch to node v18.10.0

gefeiyanga avatar Feb 08 '23 12:02 gefeiyanga

I change paramer "model" to "engine", it is ok. I use python api. @gzgogo

response = openai.Completion.create(
            engine="text-davinci-003",
            prompt=question,
            max_tokens=1024,
            n=1,
            stop=None,
            temperature=0.5
        )

liseri avatar Feb 08 '23 12:02 liseri

In your code snippet, you're trying to use the text-davinci-003 model. But looking at the code, it appears the currently only gpt-3.5-turbo and gpt-3.5-turbo-0301 models are supported.

https://github.com/openai/openai-node/blob/0363de20747e272a92e41da4a4c4293104aa9461/dist/api.d.ts#L261-L266

The solution would be to make requests directly yourself, instead of using the openai-node package - here's how.

Lissy93 avatar Mar 17 '23 23:03 Lissy93