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

[Bug] DEFAULT_AGENT_CONFIG无法生效 #5699

Open
Ironboxplus opened this issue Feb 3, 2025 · 5 comments
Open

[Bug] DEFAULT_AGENT_CONFIG无法生效 #5699

Ironboxplus opened this issue Feb 3, 2025 · 5 comments
Labels
🐛 Bug Something isn't working | 缺陷

Comments

@Ironboxplus
Copy link

Ironboxplus commented Feb 3, 2025

📦 部署环境

Docker

📌 软件版本

v1.49.15

💻 系统环境

Windows

🌐 浏览器

Chrome

🐛 问题描述

当设定

DEFAULT_AGENT_CONFIG='model=deepseek-ai/DeepSeek-R1;provider=siliconcloud;'

的时候,打开网站,默认为:

Image

但是如果将model和provider交换位置,则新用户可看到模型为deepseek 的
但是此时对话,仍然会提示输入openai的apikey,除非手动选择deepseek模型
全部环境变量:

environment:
      - ENABLED_OPENAI=0
      - SILICONCLOUD_API_KEY=xxx
      - ACCESS_CODE=666
      - DEFAULT_AGENT_CONFIG='model=deepseek-ai/DeepSeek-R1;provider=siliconcloud;'
      - ENABLED_OLLAMA=0

📷 复现步骤

如上

🚦 期望结果

正确处理环境变量

📝 补充信息

No response

@Ironboxplus Ironboxplus added the 🐛 Bug Something isn't working | 缺陷 label Feb 3, 2025
@github-project-automation github-project-automation bot moved this to Roadmap - Chat 1.x in Lobe Chat Routine Feb 3, 2025
@lobehubbot
Copy link
Member

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


📦 deployment environment

Docker

📌 Software version

v1.49.15

💻 System environment

Windows

🌐 browser

Chrome

🐛 Problem description

Set
` Default_Agent_config = 'Model = Deepseek-AI/Deepseek-R1; Provider = SiliconCloud;' `
When, open the website and default:

! [Image] (https://github.com/user-attachments/9cb9e69b-59ce-414e5-72570F48d))

But if the Model and Provider exchange positions, the new user can see the model as deepseek
But at this time the dialogue will still be prompted to enter the APIKEY of Openai, unless you choose the Deepseek model manually
All environment variables:
` environment: -ENableD_OPENAI = 0 -SiliconCloud_api_Key = SK-NOTWGHMPEQIFIQCMXBTOGNQNYRETUPMGMMJXRFOKPST -Access_code = 666 -DEFAULT_AGENT_CONFIG = 'Model = Deepseek-AI/Deepseek-R1; Provider = SiliconCloud;' -ENabled_ollama = 0 `

📷 Reapped steps

As above

🚦 expectation result

Correctly handle environmental variables

📝 Supplement information

_NO Response

@lobehubbot
Copy link
Member

👀 @Ironboxplus

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。我们会尽快调查此事,并尽快回复您。 请确保您已经提供了尽可能多的背景信息。

Copy link

dosubot bot commented Feb 3, 2025

@Ironboxplus Hello there! I'm here to help you with any bugs, questions, or contributions. Let's get this issue sorted out together while we wait for a human maintainer.

I found a similar closed issue regarding the DEFAULT_AGENT_CONFIG not taking effect. The issue was resolved by ensuring the environment variable was set correctly, specifying the provider name in lowercase, and formatting the configuration properly [1].

To address your issue, make sure the DEFAULT_AGENT_CONFIG is correctly formatted. For example:

DEFAULT_AGENT_CONFIG='{"model":"deepseek-ai/DeepSeek-R1","provider":"siliconcloud"}'

Ensure that the configuration is a valid JSON string or formatted as key-value pairs. Additionally, verify that all other related environment variables are set correctly and that the Docker configuration is properly handling these variables. If the problem persists, consider checking the parsing logic in the LobeChat codebase to ensure it aligns with your configuration format [2].

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other

@Ironboxplus
Copy link
Author

update:
在更新环境变量为:
DEFAULT_AGENT_CONFIG: model=deepseek-ai/DeepSeek-R1;provider=siliconcloud
之后,问题解决了

@lobehubbot
Copy link
Member

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


Update:
Update the environment variables:
Default_Agent_config: Model = Deepseek-AI/Deepseek-R1; Provider = SiliconCloud
After that, the problem was solved

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
Status: Roadmap - Chat 1.x
Development

No branches or pull requests

2 participants