When a random programmer try to practice with this example, they will have problem configuring openai because Elliot made this example running openai v3 and it doesn't work anymore. I could fix the config for openai v4.
The current problem will be in [gpt.ts file] and I use this config to solve the issue:
// openai V4
import OpenAi from "openai"
const openai = new OpenAi({
apiKey: process.env.OPENAI_API_KEY
});
When a random programmer try to practice with this example, they will have problem configuring openai because Elliot made this example running openai v3 and it doesn't work anymore. I could fix the config for openai v4. The current problem will be in [gpt.ts file] and I use this config to solve the issue: