fix:修复了记忆快速提取问题

This commit is contained in:
SengokuCola
2025-05-23 16:40:44 +08:00
parent 9625750e62
commit febe2b4c41
4 changed files with 11 additions and 4 deletions

View File

@@ -60,6 +60,9 @@ class MemoryActivator:
obs_info_text += f"{working_info_item['type']}: {working_info_item['content']}\n"
elif isinstance(observation, HFCloopObservation):
obs_info_text += observation.get_observe_info()
logger.debug(f"回忆待检索内容obs_info_text: {obs_info_text}")
# prompt = await global_prompt_manager.format_prompt(
# "memory_activator_prompt",
@@ -81,7 +84,7 @@ class MemoryActivator:
# valid_keywords=keywords, max_memory_num=3, max_memory_length=2, max_depth=3
# )
related_memory = await HippocampusManager.get_instance().get_memory_from_text(
text=obs_info_text, max_memory_num=3, max_memory_length=2, max_depth=3, fast_retrieval=True
text=obs_info_text, max_memory_num=5, max_memory_length=2, max_depth=3, fast_retrieval=True
)
# logger.debug(f"获取到的记忆: {related_memory}")