diff --git a/api/app/services/app_service.py b/api/app/services/app_service.py index 8a2a0428..38eb5f4c 100644 --- a/api/app/services/app_service.py +++ b/api/app/services/app_service.py @@ -955,11 +955,13 @@ class AppService: ).order_by( AgentConfig.updated_at.desc() ) - config = self.db.scalars(stmt).first() + config = self.db.scalars(stmt).first() + config_memory=config.memory + if 'memory_content' in config_memory: + config.memory['memory_config_id'] = config.memory.pop('memory_content') if config: return config - # 返回默认配置模板(不保存到数据库) logger.debug("配置不存在,返回默认模板", extra={"app_id": str(app_id)}) return self._create_default_agent_config(app_id)