mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-05-01 20:03:28 +02:00
refactor: brain memory
This commit is contained in:
parent
1ce9ad54fd
commit
7c6b0325d8
1 changed files with 1 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue