🌟 The Multi-Agent Framework: First AI Software Company, Towards Natural Language Programming
feat: truncated history
莘权 马05532426c08a
diff --git a/metagpt/memory/brain_memory.py b/metagpt/memory/brain_memory.pyindex f309b532e..d83611af1 100644--- a/metagpt/memory/brain_memory.py+++ b/metagpt/memory/brain_memory.py@@ -107,7 +107,7 @@ class BrainMemory(pydantic.BaseModel):def add_history(self, msg: Message):if msg.id:- if self.to_int(msg.id, 0) < self.to_int(self.last_history_id, -1):+ if self.to_int(msg.id, 0) <= self.to_int(self.last_history_id, -1):returnself.history.append(msg.dict())self.is_dirty = True