refactor: brain memory

This commit is contained in:
莘权 马 2023-09-07 19:30:35 +08:00
parent 44706ba141
commit 948d1577e4

View file

@ -8,7 +8,6 @@
from collections import defaultdict
from typing import Iterable, Type
from metagpt.actions import Action
from metagpt.schema import Message
@ -17,6 +16,8 @@ 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)