ยท hands on
Module openai has no exported member
OpenAI's Node.js API Library has updated from Version 3 to Version 4. Changes include updating imports adjusting method calls.
There has been a major upgrade in OpenAI's Node.js API Library. When switchting from Version 3 to Version 4 you have to take into account some breaking API changes. You may also run into "insufficient_quota" errors if you don't upgrade legacy User API keys to to Project API keys (read more).
API Changes
Here is a list of the most common changes and how to update them.
Module '"openai"' has no exported member 'Configuration'. Did you mean to use 'import Configuration from "openai"' instead?
Version 3
After
'"openai"' has no exported member named 'OpenAIApi'. Did you mean 'OpenAI'?
Version 3
After
Module '"openai"' has no exported member 'ChatCompletionRequestMessage'. Did you mean to use 'import ChatCompletionRequestMessage from "openai"' instead?
Version 3
After
Property 'createChatCompletion' does not exist on type 'OpenAI'.
Version 3
After