Hey everyone. I’m trying to build a project with the API using NodeJS. Although I’m quite confused by the fact that in the new documentation, they are importing the openai library via the following line of code: import OpenAI from “openai”. I’m not too experienced with NodeJS but it seems to be that this kind of import does not work (usually you would use the require() function). Does anyone know a solution to this? Thanks.
Related topics
Topic | Replies | Views | Activity | |
---|---|---|---|---|
Import Error with OpenAIApi in Node.js Project | 1 | 1967 | December 8, 2023 | |
Const require vs. import ? Would there be a problem using require? | 1 | 2900 | September 7, 2023 | |
Error with importing Configuration in Node.js | 2 | 5835 | August 26, 2023 | |
Boiler plate not working for nodejs library | 1 | 1138 | October 13, 2023 | |
How do I resolve this error to correct for browser support from node js? | 4 | 2906 | June 13, 2023 |