feat:新增记忆测试、检索工具与服务
新增完整的长期记忆支持及测试:引入中文记忆检索提示词、query_long_term_memory 检索工具、记忆服务与记忆流程服务,以及 WebUI 的记忆路由。新增大规模测试套件(包括单元测试与基准/在线测试),覆盖聊天历史摘要、知识获取器、事件(episode)生成、写回机制以及用户画像检索等功能。 更新多个模块以集成记忆检索能力(包括 knowledge fetcher、chat summarizer、memory_retrieval、person_info、config/legacy 迁移以及 WebUI 路由),并移除遗留的 lpmm 知识模块。这些变更完成了记忆运行时的接入,同时为基准测试提供嵌入适配器的 mock,并支持新测试与工具所需的导入与 episode 处理流程。
This commit is contained in:
@@ -237,8 +237,8 @@ async def _react_agent_solve_question(
|
||||
if first_head_prompt is None:
|
||||
# 第一次构建,使用初始的collected_info(即initial_info)
|
||||
initial_collected_info = initial_info or ""
|
||||
# 使用 LPMM 知识库检索 prompt
|
||||
first_head_prompt_template = prompt_manager.get_prompt("memory_retrieval_react_prompt_head_lpmm")
|
||||
# 使用统一长期记忆检索 prompt
|
||||
first_head_prompt_template = prompt_manager.get_prompt("memory_retrieval_react_prompt_head_memory")
|
||||
first_head_prompt_template.add_context("bot_name", bot_name)
|
||||
first_head_prompt_template.add_context("time_now", time_now)
|
||||
first_head_prompt_template.add_context("chat_history", chat_history)
|
||||
|
||||
Reference in New Issue
Block a user