-
Notifications
You must be signed in to change notification settings - Fork 738
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
'openai' does not provide an export named 'Configuration' 🥲 #68
Comments
Utkarsh is correct although to completely fix this do: |
Thanks for letting me know! |
Bro it is showing the error as OpenAIError: The OPENAI_API_KEY environment variable is missing or empty; either provide it, or instantiate the OpenAI client with an apiKey option, like new OpenAI({ apiKey: 'My API Key' }). |
Try installing axios in root folder(open_ai folder ) import express from 'express'; dotenv.config(); const apiKey = process.env.OPENAI_API_KEY; const app = express(); app.get('/', async (req, res) => { app.post('/', async (req, res) => {
} catch (error) { app.listen(5001, () => console.log('AI server started on http://localhost:5001')); |
Hey everyone, I'm following along and I'm at 38:00 on the video but when I try to run the server I get this in the Terminal (see screenshot).
Can anyone advise what I can do to fix this? 🙏 Thanks!!
The text was updated successfully, but these errors were encountered: