-1

Get "That model does not exist" from api call in node.js

const chatGptUrl = "https://api.openai.com/v1/engines/chat-gpt/jobs";

...

const response = await axios.post(
      chatGptUrl,
      {
        prompt,
        max_tokens: 100,
        n: 1,
        stop: "",
      },
      {
        headers: {
          "Content-Type": "application/json",
          "Authorization": `Bearer ${chatGptApiKey}`,
        },
      }
    );

    const responseText = response.data.choices[0].text;
Rok Benko
  • 14,265
  • 2
  • 24
  • 49
chovy
  • 72,281
  • 52
  • 227
  • 295

1 Answers1

2

You have to set the model parameter to text-davinci-003, text-curie-001, text-babbage-001 or text-ada-001. It's a required parameter.

Also, all Engines endpoints are deprecated.

Deprecated

Rok Benko
  • 14,265
  • 2
  • 24
  • 49