修复长期记忆bug
Some checks failed
构建并部署 AI Agent 服务 / deploy (push) Failing after 1m16s

This commit is contained in:
2026-04-20 17:30:39 +08:00
parent 3143e0e4e6
commit c210bcdb0b
6 changed files with 40 additions and 39 deletions

View File

@@ -31,8 +31,8 @@ async def memory_trigger_node(state: MessagesState, config: RunnableConfig) -> D
if not _mem0_client._initialized:
await _mem0_client.initialize()
# 将用户消息作为事实来源提交给 Mem0
info(f"📌 检测到记忆指令,已主动触发 Mem0 存储")
mem0_messages = [{"role": "user", "content": content}]
await _mem0_client.add_memories(mem0_messages, user_id=user_id)
info(f"📌 检测到记忆指令,已主动触发 Mem0 存储")
return {} # 不修改状态