-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Description
Do you need to file an issue?
- I have searched the existing issues and this bug is not already filed.
- I believe this is a legitimate bug, not just a question or feature request.
Describe the bug
通过docker部署,确认过映射和功能都没有我问题后,在添加新的llm时出现疑似apikey未持久化问题,测试连接成功,但保存后再次测试报错,编辑配置时API Key输入框为空,查看data目录发现实际配置已写入data/user/settings/llm_configs.json,同时重启docker发现项目能成功读取除了apikey以外的其他内容(如模型名和url)。
Steps to reproduce
- dockercompose.yaml使用此配置文件在docker compose部署(已去除敏感内容)
- 构建成功并测试完对话功能和rag相关功能正常
- 在设置-llm添加新的llm(我这里使用的是mimo)
- 点击测试,显示成功提示
- 点击保存后点击测试,出现401报错
- 再次点击编辑发现此处没有apikey,去docker文件夹在
data/user/settings/llm_configs.json发现了apikey,说明应该成功保存了,但是就是出现在未点击保存时测试显示正常,保存后测试显示401
Expected Behavior
保存后测试显示Connection failed: [openai] HTTP 401 [openai] HTTP 401 OpenAI API error: { "error": { "message": "Invalid API Key", "param": "Please provide valid API Key, Format: Authorization: Bearer or api-key: ", "code": "401", "type": "invalid_key" } },再次点击编辑发现此处没有apikey,去docker文件夹在data/user/settings/llm_configs.json发现了apikey,说明应该成功保存了,但是就是出现在未点击保存时测试显示正常,保存后测试显示401
Related Module
Frontend/Web
Configuration Used
services:
deeptutor:
image: ghcr.io/hkuds/deeptutor:latest
container_name: deeptutor1
restart: unless-stopped
ports:
- 28001:28001
- 23782:23782
environment:
- LLM_BINDING=openai
# LLMs 模型名称
- LLM_MODEL=deepseek-chat
- LLM_API_KEY=
# LLMs API URL 地址
- LLM_HOST=https://api.deepseek.com/v1
- DISABLE_SSL_VERIFY=false
# 向量模型名称
- EMBEDDING_MODEL=BAAI/bge-m3
- EMBEDDING_API_KEY=
# 向量模型 URL 地址
- EMBEDDING_HOST=https://api.siliconflow.cn/v1
- EMBEDDING_DIM=1024
- EMBEDDING_MAX_TOKENS=8192
- RAG_TOOL_MODULE_LOG_LEVEL=INFO
- BACKEND_PORT=28001
- FRONTEND_PORT=23782
# 后端 API 访问地址
- NEXT_PUBLIC_API_BASE_EXTERNAL=
- NEXT_PUBLIC_API_BASE=
# 补充时区配置
- TZ=Asia/Shanghai
volumes:
- /vol2/1000/docker/deeptutor/config:/app/config
- /vol2/1000/docker/deeptutor/data/user:/app/data/user
- /vol2/1000/docker/deeptutor/data/knowledge:/app/data/knowledge_bases
Logs and screenshots
上图日志为docker日志,项目输出的log并未看到相关内容
Additional Information
- DeepTutor Version:latest
- Operating System:fnOS(linux)
- Python Version:
- Node.js Version:
- Browser (if applicable):
- Related Issues: