fix: 修改embedding

This commit is contained in:
tcmofashi
2025-03-07 03:40:14 +08:00
parent a3b8a545af
commit 0ced4939ec
4 changed files with 5 additions and 5 deletions

View File

@@ -673,7 +673,7 @@ class Hippocampus:
if first_layer:
# 如果记忆条数超过限制,随机选择指定数量的记忆
if len(first_layer) > max_memory_num/2:
first_layer = random.sample(first_layer, max_memory_num)
first_layer = random.sample(first_layer, max_memory_num//2)
# 为每条记忆添加来源主题和相似度信息
for memory in first_layer:
relevant_memories.append({