refactor: brain memory

This commit is contained in:
莘权 马 2023-09-08 12:08:05 +08:00
parent bed3d8c841
commit 5f3931820e

View file

@ -87,7 +87,7 @@ class TalkAction(Action):
format_msgs.append({"role": "assistant", "content": self._knowledge})
if self._history_summary:
if CONFIG.LLM_TYPE == LLMType.METAGPT.value:
format_msgs.append(json.loads(self._history_summary))
format_msgs.extend(json.loads(self._history_summary))
else:
format_msgs.append({"role": "assistant", "content": self._history_summary})
return self._talk, format_msgs, system_msgs