Fix/develop memory bug (#339)
* 遗漏的历史映射 * 遗漏的历史映射 * fix_timeline_memories * fix_timeline_memories * write_gragp/bug_fix * write_gragp/bug_fix * write_gragp/bug_fix * write_gragp/bug_fix * Multiple independent transactions - single transaction * memory_content ->memory_config_id * memory_content ->memory_config_id * memory_content ->memory_config_id * memory_content ->memory_config_id * memory_content ->memory_config_id
This commit is contained in:
@@ -955,11 +955,13 @@ class AppService:
|
|||||||
).order_by(
|
).order_by(
|
||||||
AgentConfig.updated_at.desc()
|
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:
|
if config:
|
||||||
return config
|
return config
|
||||||
|
|
||||||
# 返回默认配置模板(不保存到数据库)
|
# 返回默认配置模板(不保存到数据库)
|
||||||
logger.debug("配置不存在,返回默认模板", extra={"app_id": str(app_id)})
|
logger.debug("配置不存在,返回默认模板", extra={"app_id": str(app_id)})
|
||||||
return self._create_default_agent_config(app_id)
|
return self._create_default_agent_config(app_id)
|
||||||
|
|||||||
Reference in New Issue
Block a user