feat: 将LLM配置主存储迁移到MySQL

变更项: 1) 新增 t_llm_config 数据访问层与建表逻辑。 2) Robot 启动时自动初始化并在空库时从 YAML 导入。 3) 后台 system LLM API 改为读写 MySQL。 4) LLMRegistry 改为优先 MySQL 读取并回退 YAML。 5) DashboardServer 挂载 llm_config_db 提供后台访问。
This commit is contained in:
liuwei
2026-04-20 14:51:43 +08:00
parent ef49588485
commit 1446bf5f39
5 changed files with 287 additions and 24 deletions

View File

@@ -51,6 +51,7 @@ class DashboardServer:
self.plugin_schedule_db = robot_instance.plugin_schedule_db
self.plugin_schedule_manager = robot_instance.plugin_schedule_manager
self.group_plugin_config_db = robot_instance.group_plugin_config_db
self.llm_config_db = robot_instance.llm_config_db
self.group_plugin_config_service = robot_instance.group_plugin_config_service
# 获取联系人管理器实例
self.contact_manager = robot_instance.contact_manager