mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-06-17 15:35:21 +02:00
fix choose_retrieved
This commit is contained in:
parent
9e19575a99
commit
8bd76a1f14
2 changed files with 5 additions and 4 deletions
|
|
@ -44,7 +44,7 @@ def plan(role: "STRole", maze: Maze, roles: dict["STRole"], new_day: bool, retri
|
|||
# ["thoughts"] = [<ConceptNode>, ...]}
|
||||
focused_event = False
|
||||
if retrieved.keys():
|
||||
focused_event = _choose_retrieved(role, retrieved)
|
||||
focused_event = _choose_retrieved(role.name, retrieved)
|
||||
|
||||
# Step 2: Once we choose an event, we need to determine whether the
|
||||
# role will take any actions for the perceived event. There are
|
||||
|
|
|
|||
|
|
@ -17,10 +17,11 @@ def test_should_react():
|
|||
observed = role_ir.observe()
|
||||
retrieved = role_ir.retrieve(observed)
|
||||
|
||||
focused_event = _choose_retrieved(role_ir, retrieved)
|
||||
focused_event = _choose_retrieved(role_ir.name, retrieved)
|
||||
|
||||
reaction_mode = _should_react(role_ir, focused_event, roles) # chat with Isabella Rodriguez
|
||||
assert "chat with" in reaction_mode
|
||||
if focused_event:
|
||||
reaction_mode = _should_react(role_ir, focused_event, roles) # chat with Isabella Rodriguez
|
||||
assert "chat with" in reaction_mode
|
||||
|
||||
|
||||
def test_wait_react():
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue