Skip to content

🌟 The Multi-Agent Framework: First AI Software Company, Towards Natural Language Programming

feat: recover `history`

莘权 马93ebe8c10338
diff --git a/metagpt/environment.py b/metagpt/environment.py
index a7e6322ff..75a790714 100644
--- a/metagpt/environment.py
+++ b/metagpt/environment.py
@@ -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