refactor: 精简环境配置,移除废弃配置项
.env: - 移除 HOST/PORT/DEBUG(代码未读取,由 uvicorn 命令行控制) - 移除 WEWORK_BOT_SEARCH_LIMIT(已被 SEARCH_LIMIT 取代) - 补充硅基流动配置注释 .env.example: - 同步移除 HOST/PORT/DEBUG/WEWORK_BOT_SEARCH_LIMIT - 补充 OpenAI 兼容硅基流动的说明 - 更新机器人注释(集成模式自动启动) config.py: - 移除 HOST/PORT/DEBUG 字段定义 - 移除 WEWORK_BOT_SEARCH_LIMIT 字段定义 wework_bot.py: - 改为从 settings 统一读取配置(不再 os.getenv) - _get_search_limit fallback 改为 settings.SEARCH_LIMIT - 更新模块文档注释
This commit is contained in:
13
.env.example
13
.env.example
@@ -11,11 +11,12 @@ POSTGRES_PASSWORD=postgres
|
||||
|
||||
# ── 嵌入模型配置 ──
|
||||
# 可选值: openai / zhipu / local_bge / dashscope / minimax
|
||||
# openai 模式也兼容硅基流动等第三方 OpenAI 兼容接口
|
||||
EMBEDDING_PROVIDER=minimax
|
||||
EMBEDDING_MODEL=MiniMax-Text-Embedding
|
||||
EMBEDDING_DIMENSIONS=1024
|
||||
|
||||
# ── OpenAI 配置 ──
|
||||
# ── OpenAI 配置(也兼容硅基流动等第三方接口) ──
|
||||
OPENAI_API_KEY=sk-your-openai-api-key
|
||||
OPENAI_BASE_URL=https://api.openai.com/v1
|
||||
|
||||
@@ -52,7 +53,7 @@ DEEPSEEK_API_KEY=your-deepseek-api-key
|
||||
DEEPSEEK_BASE_URL=https://api.deepseek.com
|
||||
DEEPSEEK_OCR_MODEL=deepseek-chat
|
||||
|
||||
# ── LLM 配置(用于查询扩展、实体检测) ──
|
||||
# ── LLM 配置(用于查询扩展、实体检测等) ──
|
||||
# 可选值: minimax / deepseek / openai
|
||||
LLM_PROVIDER=minimax
|
||||
|
||||
@@ -63,11 +64,6 @@ DATA_DIR=/app/data
|
||||
CHUNK_SIZE=300
|
||||
CHUNK_OVERLAP=50
|
||||
|
||||
# ── 服务配置 ──
|
||||
HOST=0.0.0.0
|
||||
PORT=8000
|
||||
DEBUG=false
|
||||
|
||||
# ── CORS 配置(多个来源用逗号分隔) ──
|
||||
CORS_ORIGINS=["*"]
|
||||
|
||||
@@ -76,9 +72,8 @@ APP_PORT=8000
|
||||
DB_PORT=5432
|
||||
|
||||
# ── 企业微信智能机器人(WebSocket 长连接) ──
|
||||
# 作为独立进程运行:python -m app.wework_bot
|
||||
# 后端启动时会自动检测配置并拉起机器人(后台线程)
|
||||
WEWORK_BOT_ENABLED=false
|
||||
WEWORK_BOT_ID=your-bot-id
|
||||
WEWORK_BOT_SECRET=your-bot-secret
|
||||
WEWORK_BOT_SEARCH_LIMIT=3
|
||||
EDUBRAIN_BASE_URL=http://localhost:8765
|
||||
|
||||
Reference in New Issue
Block a user