🌟 The Multi-Agent Framework: First AI Software Company, Towards Natural Language Programming
refactor: brain memory
莘权 马c66012d087b9
diff --git a/metagpt/memory/memory.py b/metagpt/memory/memory.pyindex f9dd5c1a3..bf9f0541c 100644--- a/metagpt/memory/memory.py+++ b/metagpt/memory/memory.py@@ -8,6 +8,7 @@from collections import defaultdictfrom typing import Iterable, Type+from metagpt.actions import Actionfrom metagpt.schema import Message@@ -16,8 +17,6 @@ class Memory:def __init__(self):"""Initialize an empty storage list and an empty index dictionary"""- from metagpt.actions import Action-self.storage: list[Message] = []self.index: dict[Type[Action], list[Message]] = defaultdict(list)diff --git a/metagpt/provider/metagpt_llm_api.py b/metagpt/provider/metagpt_llm_api.pyindex 3ae65a623..95514cf53 100644--- a/metagpt/provider/metagpt_llm_api.py+++ b/metagpt/provider/metagpt_llm_api.py@@ -6,7 +6,6 @@@Desc : MetaGPT LLM related APIs"""-from metagpt.memory.brain_memory import BrainMemoryfrom metagpt.provider import OpenAIGPTAPI@@ -16,7 +15,7 @@ class MetaGPTLLMAPI(OpenAIGPTAPI):def __init__(self):super().__init__()- async def get_summary(self, memory: BrainMemory, max_words=200, keep_language: bool = False, **kwargs) -> str:+ async def get_summary(self, memory, max_words=200, keep_language: bool = False, **kwargs) -> str:"""Return string in the following format:[