【问题标题】:openai api gives me this error with basic example: "That model does not exist"openai api 通过基本示例给了我这个错误:\"That model does not exist\"
【发布时间】:2023-02-02 20:09:11
【问题描述】:

从 node.js 中的 api 调用获取“该模型不存在”

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;

【问题讨论】:

    标签: node.js openai gpt-3


    【解决方案1】:

    您必须将 model 参数设置为 text-davinci-003、text-curie-001、text-babbage-001 或 text-ada-001。这是一个required parameter。

    另外,这是正确的 URL:

    POST https://api.openai.com/v1/completions
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-02-29
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-06-19
      相关资源
      最近更新 更多