Hi @yash ,
Thanks for using Microsoft Q&A!!
I believe you are trying to use the Completions with the latest version (0613) of gpt-3.5-turbo.
Unfortunately, completions is NOT supported for newer models, it is only supported on older model versions and thus you are getting this error. OpenAI has deprecated this endpoint entirely, Azure OpenAI still supports it, but only in this limited capacity for older models. New model version will only be supported on the chat completions endpoint.
Please refer to the documentation for details (see snippet from the documentation below):
Also, older model 0301 supports completions and would still technically work in the studio today in both the completions and chat playground.
I suggest you to please use the Chat completions instead to get the summarization. Please refer to the sample for syntax of using the getChatCompletions function.
Please find below the code which you can use for your usecase:
const messages = [
{ role: "system", content: "You are an AI assistant that helps summarizing the texts." },
{ role: "user", content:
`
Summarize the following text.
Text:
""""""
${textToSummarize}
""""""
Summary:
` }
];
try {
const result = await client.getChatCompletions(deploymentName, messages);
for (const choice of result.choices) {
console.log(choice.message);
}
} catch (err) {
console.log(err);
}
})();
Please let me know if you have any other questions.
Thanks
Saurabh
Please do not forget to "Accept the answer" wherever the information provided helps you to help others in the community.