ChatGPTNextWeb / ChatGPT-Next-Web

A cross-platform ChatGPT/Gemini UI (Web / PWA / Linux / Win / MacOS). 一键拥有你自己的跨平台 ChatGPT/Gemini 应用。
https://app.nextchat.dev/
MIT License
72.69k stars 57.75k forks source link

无法调用.env文件的OPENAI_API_KEY #4714

Closed ws910616 closed 1 month ago

ws910616 commented 1 month ago

.env文件已经配置OPENAI_API_KEY字段,通过浏览器访问后输入密码后进行聊天还是提示“访问密码不正确或为空,请前往登录页输入正确的访问密码,或者在设置页填入你自己的 OpenAI API Key”,输入“OPENAI_API_KEY”后可以正常聊天,请问为什么不能调用.env文件配置的OPENAI_API_KEY我是本地服务器部署。

nextchat-manager[bot] commented 1 month ago

Please follow the issue template to update title and description of your issue.

Issues-translate-bot commented 1 month ago

Bot detected the issue body's language is not English, translate it automatically.


Title: Unable to call OPENAI_API_KEY of .env file

The .env file has been configured with the OPENAI_API_KEY field. After entering the password after accessing through the browser to chat, it still prompts "The access password is incorrect or empty. Please go to the login page to enter the correct access password, or fill in your own OpenAI API on the settings page. Key", you can chat normally after inputting "OPENAI_API_KEY". Why can't I call the OPENAI_API_KEY configured in the .env file? I am deploying it on a local server.