mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-06-08 15:05:17 +02:00
feat: recover history
This commit is contained in:
parent
a045f73fec
commit
93ebe8c103
1 changed files with 2 additions and 0 deletions
|
|
@ -29,6 +29,7 @@ class Environment(BaseModel):
|
|||
|
||||
roles: dict[str, Role] = Field(default_factory=dict)
|
||||
consumers: dict[Role, Set] = Field(default_factory=dict)
|
||||
history: str = Field(default="") # For debug
|
||||
|
||||
class Config:
|
||||
arbitrary_types_allowed = True
|
||||
|
|
@ -67,6 +68,7 @@ class Environment(BaseModel):
|
|||
found = True
|
||||
if not found:
|
||||
logger.warning(f"Message no recipients: {message.dump()}")
|
||||
self.history += f"\n{message}" # For debug
|
||||
|
||||
return True
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue