Skip to content

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

feat: +cache

莘权 马230239b3e7fe
diff --git a/metagpt/memory/brain_memory.py b/metagpt/memory/brain_memory.py
index 8b1b31aae..e487a696d 100644
--- a/metagpt/memory/brain_memory.py
+++ b/metagpt/memory/brain_memory.py
@@ -55,7 +55,7 @@ class BrainMemory(pydantic.BaseModel):
def history_text(self):
if len(self.history) == 0:
return ""
- texts = []
+ texts = [self.historical_summary] if self.historical_summary else []
for m in self.history[:-1]:
if isinstance(m, Dict):
t = Message(**m).content