lobehub / lobe-chat

🤯 Lobe Chat - an open-source, modern-design AI chat framework. Supports Multi AI Providers( OpenAI / Claude 3 / Gemini / Ollama / Azure / DeepSeek), Knowledge Base (file upload / knowledge management / RAG ), Multi-Modals (Vision/TTS) and plugin system. One-click FREE deployment of your private ChatGPT/ Claude application.
https://chat-preview.lobehub.com
Other
40.8k stars 9.29k forks source link

[Bug] 新会话总是提示“OpenAI API Key 不正确或为空,请检查 OpenAI API Key 后重试”,即便默认的模型不是chatgpt #3196

Closed earor-R closed 2 months ago

earor-R commented 2 months ago

📦 Environment

Docker

📌 Version

v1.3.5

💻 Operating System

Ubuntu

🌐 Browser

Edge

🐛 Bug Description

我使用环境变量配置默认的模型为llama2-chinese,但是使用新的浏览器开启默认会话,还是会提示填写OpenAI API Key,必须要手动切换一下模型才能正常使用。

docker run -d -p 3210:3210 -e DEFAULT_AGENT_CONFIG='model=llama2-chinese' -e ENABLED_OPENAI=0 -e OPENAI_MODEL_LIST='-all,+gpt-3.5-turbo' -e OLLAMA_PROXY_URL=http://xxx.net:7634 -e OLLAMA_MODEL_LIST='-all,+llama3,+phi3,+qwen2,+llama2-chinese,+codellama,+llava' -e ACCESS_CODE=xxx --name lobe-chat lobehub/lobe-chat 

📷 Recurrence Steps

  1. 使用docker命名部署lobe-chat
  2. 使用清除缓存之后的浏览器打开LobeChat的页面
  3. 和默认助手对话或者新建助手进行对话
  4. 填入ACCESS_CODE之后会出现这个提示

🚦 Expected Behavior

当我使用ollama的模型时不要提示OpenAI API Key 不正确或为空,请检查 OpenAI API Key 后重试

📝 Additional Information

我尝试了只添加环境变量ENABLED_OPENAI=0,不添加OPENAI相关的任何环境变量,都没用,希望开发者解决,谢谢。

lobehubbot commented 2 months ago

👀 @earor-R

Thank you for raising an issue. We will investigate into the matter and get back to you as soon as possible. Please make sure you have given us as much context as possible.\ 非常感谢您提交 issue。我们会尽快调查此事,并尽快回复您。 请确保您已经提供了尽可能多的背景信息。

lobehubbot commented 2 months ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


📦 Environment

Docker

📌 Version

v1.3.5

💻 Operating System

Ubuntu

🌐 Browser

Edge

🐛 Bug Description

I use environment variables to configure the default model to llama2-chinese, but when I use a new browser to open the default session, I will still be prompted to fill in the OpenAI API Key, and I must manually switch the model to use it normally.

docker run -d -p 3210:3210 -e DEFAULT_AGENT_CONFIG='model=llama2-chinese' -e ENABLED_OPENAI=0 -e OPENAI_MODEL_LIST='-all,+gpt-3.5-turbo' -e OLLAMA_PROXY_URL=http://xxx. net:7634 -e OLLAMA_MODEL_LIST='-all,+llama3,+phi3,+qwen2,+llama2-chinese,+codellama,+llava' -e ACCESS_CODE=xxx --name lobe-chat lobehub/lobe-chat

📷 Recurrence Steps

  1. Use docker to name and deploy lobe-chat
  2. Open the LobeChat page using a browser that has cleared the cache.
  3. Talk to the default assistant or create a new assistant
  4. This prompt will appear after filling in ACCESS_CODE

🚦 Expected Behavior

When I use ollama's model Don't prompt OpenAI API Key is incorrect or empty, please check OpenAI API Key and try again

📝 Additional Information

I tried only adding the environment variable ENABLED_OPENAI=0 without adding any environment variables related to OPENAI, but it was useless. I hope the developer can solve it, thank you.

earor-R commented 2 months ago

忘记添加图片了

image

arvinxx commented 2 months ago

要加 provider=ollama

lobehubbot commented 2 months ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


To add provider=ollama

lobehubbot commented 2 months ago

✅ @earor-R

This issue is closed, If you have any questions, you can comment and reply.\ 此问题已经关闭。如果您有任何问题,可以留言并回复。