An Azure service that provides access to OpenAI’s GPT-3 models with enterprise capabilities.
Make sure that the variable deploymentId is equal to the name of the deployment on azure and not the model name.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I have deployed Azure OpenAI and can use the openAI playground, but when I try to access using the sample code below with javascript, it returns the following error. It's already been 4 days since I deployed it and I think there is something wrong. is there anyone having same issue? or does anyone knows how to fix it?
const {OpenAIClient, AzureKeyCredential} = require("@azure/openai");
const endpoint = "";
const azureApiKey = "";
const messages = [
{role: "system", content: "You are a helpful assistant."},
{role: "user", content: "Does Azure OpenAI support customer managed keys?"},
{
role: "assistant",
content: "Yes, customer managed keys are supported by Azure OpenAI",
},
{role: "user", content: "Do other Azure Cognitive Services support this too"},
];
async function main() {
console.log("== Chat Completions Sample ==");
const client = new OpenAIClient(
endpoint,
new AzureKeyCredential(azureApiKey),
);
const deploymentId = "gpt-35-turbo";
const result = await client.getChatCompletions(deploymentId, messages);
for (const choice of result.choices) {
console.log(choice.message);
}
}
main().catch((err) => {
console.error("The sample encountered an error:", err);
});
module.exports = {main};
error: {
code: 'DeploymentNotFound',
message: 'The API deployment for this resource does not exist. If you created the deployment within the last 5 minutes, please wait a moment and try again.'
}
An Azure service that provides access to OpenAI’s GPT-3 models with enterprise capabilities.
Make sure that the variable deploymentId is equal to the name of the deployment on azure and not the model name.