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字段 #4716

Open ws910616 opened 1 month ago

ws910616 commented 1 month ago

Bug Description

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

Steps to Reproduce

![上传image.png...]() ![Uploading image.png…]()

Expected Behavior

在web界面不输入OPENAI_API_KEY情况调用.env配置的OPENAI_API_KEY。

Screenshots

No response

Deployment Method

Desktop OS

No response

Desktop Browser

No response

Desktop Browser Version

No response

Smartphone Device

No response

Smartphone OS

No response

Smartphone Browser

No response

Smartphone Browser Version

No response

Additional Logs

No response

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: [Error].env file has been configured with OPENAI_API_KEY field

vonandrew commented 1 month ago

你需要的是在服务端配置环境变量CODE,然后在用户界面【访问密码】中输入这个CODE

Issues-translate-bot commented 1 month ago

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


What you need is to configure the environment variable CODE on the server side, and then enter this CODE in the user interface [Access Password].

Dean-YZG commented 1 month ago

本地服务器的部署方式是?

Issues-translate-bot commented 1 month ago

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


How is the local server deployed?

Dean-YZG commented 1 month ago

是不是在部署和启动服务的过程中在其他的地方设置了空的OPENAI_API_KEY变量,导致覆盖了 .env的设置?

Issues-translate-bot commented 1 month ago

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


Is the empty OPENAI_API_KEY variable set elsewhere during the deployment and startup of the service, causing the .env setting to be overwritten?