openai-openapi icon indicating copy to clipboard operation
openai-openapi copied to clipboard

adapter is not a function when calling createChatCompletion

Open mohamedcherifmo opened this issue 1 year ago • 2 comments

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"}],
          });

mohamedcherifmo avatar Mar 16 '23 13:03 mohamedcherifmo