Skip to content

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

refactor: brain memory

莘权 马7c6b0325d8a2
diff --git a/metagpt/roles/assistant.py b/metagpt/roles/assistant.py
index 66daef403..397ddc94b 100644
--- a/metagpt/roles/assistant.py
+++ b/metagpt/roles/assistant.py
@@ -121,7 +121,7 @@ class Assistant(Role):
if not self.memory.is_history_available:
return last_talk
history_summary = await self.memory.summarize(max_words=800, keep_language=True, llm=self._llm)
- if last_talk and await BrainMemory.is_related(text1=last_talk, text2=history_summary, llm=self._llm):
+ if last_talk and await self.memory.is_related(text1=last_talk, text2=history_summary, llm=self._llm):
# Merge relevant content.
last_talk = await self.memory.rewrite(sentence=last_talk, llm=self._llm)
return last_talk