feat: 企微菜单新增 AI 分析开关 + 白名单控制

- 新增 ai_whitelist 配置项,仅白名单用户可操作 AI 开关
- 新增 app/services/ai_state.py 运行时开关模块
- 系统管理菜单新增「AI 分析」按钮 (toggle_ai)
- 监控配置、系统状态显示 AI 状态和 AI 标记统计
- pipeline 改用运行时开关 is_ai_enabled()
This commit is contained in:
2026-05-26 16:02:26 +08:00
parent 68215aa804
commit a51161b5f3
6 changed files with 122 additions and 4 deletions
+1
View File
@@ -41,6 +41,7 @@ class Settings(BaseSettings):
# AI 分析 (DeepSeek)
ai_enabled: bool = False
ai_whitelist: str = ""
ai_api_key: str = ""
ai_base_url: str = "https://api.deepseek.com/v1"
ai_model: str = "deepseek-chat"