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

[错误].env文件已经配置OPENAI_API_KEY字段 #4716

Open
1 of 3 tasks
ws910616 opened this issue May 16, 2024 · 8 comments
Open
1 of 3 tasks

[错误].env文件已经配置OPENAI_API_KEY字段 #4716

ws910616 opened this issue May 16, 2024 · 8 comments
Labels
bug Something isn't working

Comments

@ws910616
Copy link

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

  • Docker
  • Vercel
  • Server

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

@ws910616 ws910616 added the bug Something isn't working label May 16, 2024
@nextchat-manager
Copy link

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

@Issues-translate-bot
Copy link

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
Copy link

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

@Issues-translate-bot
Copy link

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
Copy link
Contributor

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

@Issues-translate-bot
Copy link

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


How is the local server deployed?

@Dean-YZG
Copy link
Contributor

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

@Issues-translate-bot
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants