从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;
1条答案
按热度按时间8iwquhpp1#
您必须将
model
参数设置为text-davinci-003
、text-curie-001
、text-babbage-001
或text-ada-001
。它是required parameter。此外,所有Engines endpoints都已弃用。