azure-openai-node
azure-openai-node copied to clipboard
Axios Error:
Hi, when using this library, I encountered following problem:
My Code:
const reqBody = await req.json();
const openAIApi = new OpenAIApi(
new Configuration({
apiKey: openAIApiKey,
azure: {
endpoint: openAIEndPoint,
apiKey: openAIApiKey,
deploymentName: openAIChatGPTDeploymentName,
}
})
);
console.log("reqBody", reqBody)
const res = await openAIApi.createChatCompletion({
model: openAIChatGPTDeploymentName,
prompt: reqBody.messages,
temperature: 0,
frequency_penalty: 0.0,
presence_penalty: 0.0,
max_tokens: 1000,
});
Error:
error - adapter is not a function
In my package.json:
"axios": "^1.3.4",
Is anything wrong with my code or dependencies?