🌟 The Multi-Agent Framework: First AI Software Company, Towards Natural Language Programming
fixbug: No user feedback, unsure if past conversation is finished.
莘权 马4fddfbab581b
diff --git a/metagpt/memory/brain_memory.py b/metagpt/memory/brain_memory.pyindex 422c096f3..9d1b038bb 100644--- a/metagpt/memory/brain_memory.py+++ b/metagpt/memory/brain_memory.py@@ -53,6 +53,6 @@ class BrainMemory(pydantic.BaseModel):@propertydef last_talk(self):if len(self.history) == 0 or not self.history[-1].is_contain_tags([MessageType.Talk.value]):- return ""+ return Nonereturn self.history[-1].contentdiff --git a/metagpt/roles/assistant.py b/metagpt/roles/assistant.pyindex 3924039b5..1e503857a 100644--- a/metagpt/roles/assistant.py+++ b/metagpt/roles/assistant.py@@ -113,6 +113,8 @@ class Assistant(Role):async def refine_memory(self) -> str:history_text = self.memory.history_textlast_talk = self.memory.last_talk+ if last_talk is None: # No user feedback, unsure if past conversation is finished.+ return Noneif history_text == "":return last_talkhistory_summary = await self._llm.get_context_title(history_text, max_words=20)