Closed f1nality closed 1 year ago
你这边解决了吗?
@bianbiandashen, not, haven't found any solutions yet
Hi,
The response is saying that model 'code-davinci-002' does not exist anymore. Tried 'code-davinci-003', same issue.
{
message: 'The model `code-davinci-002` does not exist',
type: 'invalid_request_error',
}
According to https://platform.openai.com/docs/guides/code it's also deprecated.
Moving to gpt-3.5-turbo
and using createChatCompletion
instead of createCompletion
solved the issue. It requres to use different input and output format.
Moving to
gpt-3.5-turbo
and usingcreateChatCompletion
instead ofcreateCompletion
solved the issue. It requres to use different input and output format.
is this documented anywhere??
This worked for me
const response = await this.apiApi.createChatCompletion({
model: 'gpt-3.5-turbo',
messages: [
{ role: 'user', content: queryToAi },
],
temperature: 0,
top_p: 1.0,
n: 1,
frequency_penalty: 0.0,
presence_penalty: 0.0,
stop: ['#', ';'],
});
if (response.data.choices.length > 0 && response.data.choices[0].message !== undefined) {
return response.data.choices[0].message.content);
}
Thanks, this should be documented. the davinci thing in the example is 100x more expensive...and not as good.
@ralyodio It is documented. https://platform.openai.com/docs/api-reference/chat
Describe the bug
Some days ago createCompletion request started to return 404
To Reproduce
Code snippets