Skip to content
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

The OPENAI_API_KEY environment variable is missing or empty when deploy the project on vercel #53

Open
qingtian1771 opened this issue Jun 15, 2024 · 0 comments

Comments

@qingtian1771
Copy link

I add and .env file and change the content, but when I deploy the project to vercel, the project build successful, but I got following error when I access the web page.

Error: 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' }).
at (node_modules/openai/index.mjs:26:0)
at (app/function-calling.tsx:4:15)
at (webpack/bootstrap:21:0)
at (app/action.tsx:383:8)
at (webpack/bootstrap:21:0)
at (node_modules/next/dist/esm/server/lib/app-dir-module.js:10:0)
at (node_modules/next/dist/esm/lib/metadata/resolve-metadata.js:238:0)
at (node_modules/next/dist/esm/lib/metadata/resolve-metadata.js:290:0)
at (node_modules/next/dist/esm/lib/metadata/resolve-metadata.js:476:0)
at (node_modules/next/dist/esm/lib/metadata/metadata.js:39:0)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant