mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-06-11 15:15:18 +02:00
bugfix
This commit is contained in:
parent
872ac85de5
commit
c63a7ecc18
2 changed files with 4 additions and 1 deletions
|
|
@ -24,6 +24,7 @@ class MGXEnv(Environment):
|
|||
|
||||
else:
|
||||
# every regular message goes through team leader
|
||||
message.send_to.add(tl.name)
|
||||
tl.put_message(message)
|
||||
|
||||
return True
|
||||
|
|
|
|||
|
|
@ -110,7 +110,9 @@ class TeamLeader(Role):
|
|||
"""Useful in 'react' mode. Return a Message conforming to Role._act interface."""
|
||||
self.run_commands(self.commands)
|
||||
self.task_result = TaskResult(result="Success", is_success=True)
|
||||
return Message(content="Commands executed", role="assistant")
|
||||
msg = Message(content="Commands executed", role="user", send_to=self)
|
||||
self.rc.memory.add(msg)
|
||||
return msg
|
||||
|
||||
def publish_message(self, msg):
|
||||
"""If the role belongs to env, then the role's messages will be broadcast to env"""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue