mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-06-11 15:15:18 +02:00
refactor: brain memory
This commit is contained in:
parent
44706ba141
commit
948d1577e4
1 changed files with 2 additions and 1 deletions
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue