better:海马体2.0升级,进度 60%,炸了别怪我

This commit is contained in:
SengokuCola
2025-03-28 00:11:32 +08:00
parent b474da3875
commit 6128a7f47d
4 changed files with 283 additions and 90 deletions

View File

@@ -80,10 +80,15 @@ class PromptBuilder:
# 调用 hippocampus 的 get_relevant_memories 方法
relevant_memories = await HippocampusManager.get_instance().get_memory_from_text(
text=message_txt, num=3, max_depth=2, fast_retrieval=True
text=message_txt,
max_memory_num=4,
max_memory_length=2,
max_depth=3,
fast_retrieval=False
)
# memory_str = "\n".join(memory for topic, memories, _ in relevant_memories for memory in memories)
memory_str = ""
for topic, memories in relevant_memories:
memory_str += f"{memories}\n"
print(f"memory_str: {memory_str}")
if relevant_memories: