Getting module errors (see screenshots) for the code below.
import OpenAI from “openai”;
const openai = new OpenAI();
async function main() {
const completion = await openai.chat.completions.create({
messages: [{ role: “system”, content: “You are a helpful assistant.” }],
model: “gpt-3.5-turbo”,
});
console.log(completion.choices[0]);
}
main();