mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-06-08 15:05:17 +02:00
feat: +auto append agent metadata
This commit is contained in:
parent
9be140a421
commit
1e6e9d3103
1 changed files with 2 additions and 0 deletions
|
|
@ -449,6 +449,8 @@ class Role(SerializationMixin, ContextMixin, BaseModel):
|
|||
if not self.rc.env:
|
||||
# If env does not exist, do not publish the message
|
||||
return
|
||||
if isinstance(msg, AIMessage) and not msg.agent:
|
||||
msg.with_agent(self._setting)
|
||||
self.rc.env.publish_message(msg)
|
||||
|
||||
def put_message(self, message):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue