diff --git a/examples/st_game/memory/retrieve.py b/examples/st_game/memory/retrieve.py index ffba5dcbb..9478b1f9f 100644 --- a/examples/st_game/memory/retrieve.py +++ b/examples/st_game/memory/retrieve.py @@ -70,7 +70,7 @@ def new_agent_retrieve(role, focus_points: list, n_count=30) -> dict: for i in role.memory.storage: if i.memory_id == n: i.last_accessed = role.scratch.curr_time - final_result.append(i.content) + final_result.append(i) retrieved[focal_pt] = final_result diff --git a/examples/st_game/reflect/reflect.py b/examples/st_game/reflect/reflect.py index d32d64200..761f3d943 100644 --- a/examples/st_game/reflect/reflect.py +++ b/examples/st_game/reflect/reflect.py @@ -105,6 +105,7 @@ def run_reflect(role: "STRole"): # For each of the focal points, generate thoughts and save it in the # agent's memory. for focal_pt, nodes in retrieved.items(): + xx = [i.embedding_key for i in nodes] for xxx in xx: logger.info(xxx) diff --git a/examples/st_game/tests/test_agent_memory.py b/examples/st_game/tests/test_agent_memory.py index f487218ea..9596f97d4 100644 --- a/examples/st_game/tests/test_agent_memory.py +++ b/examples/st_game/tests/test_agent_memory.py @@ -67,7 +67,7 @@ class TestAgentMemory: for i in agent_memory.storage: if i.memory_id == n: i.last_accessed = datetime.now()-timedelta(days=120) - final_result.append(i.content) + final_result.append(i) retrieved[focal_pt] = final_result logger.info(f"检索结果为{retrieved}") \ No newline at end of file