🌟 The Multi-Agent Framework: First AI Software Company, Towards Natural Language Programming
feat: +cache
莘权 马b5ea3c692f59
diff --git a/metagpt/memory/brain_memory.py b/metagpt/memory/brain_memory.pyindex 8443d69d9..027297eb8 100644--- a/metagpt/memory/brain_memory.py+++ b/metagpt/memory/brain_memory.py@@ -120,3 +120,9 @@ class BrainMemory(pydantic.BaseModel):returnself.history.append(msg.dict())self.is_dirty = True++ def exists(self, text) -> bool:+ for m in reversed(self.history):+ if m.get("content") == text:+ return True+ return False