openai-openapi
openai-openapi copied to clipboard
adapter is not a function when calling createChatCompletion
I created the following very simple openai.createChatCompletion in a nextjs edge function as soon as it's invoked it gives the error adapter is not a function
const openai = new OpenAIApi(configuration);
const completion = await openai.createChatCompletion({
model: "gpt-3.5-turbo",
messages: [{role: "user", content: "Hello world"}],
});