mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-06-17 15:35:21 +02:00
完成依赖函数修改
This commit is contained in:
parent
6f449f1505
commit
d79ed767e2
3 changed files with 3 additions and 2 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
|
|
@ -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}")
|
||||
Loading…
Add table
Add a link
Reference in a new issue