mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-06-20 15:38:09 +02:00
refactor: According to RFC 116: Updated the type of index key.
This commit is contained in:
parent
c18bc7c876
commit
09fe4593f6
1 changed files with 2 additions and 4 deletions
|
|
@ -26,10 +26,8 @@ class Memory:
|
|||
if message in self.storage:
|
||||
return
|
||||
self.storage.append(message)
|
||||
# According to the design of RFC 116, it allows message filtering based on different labels, thus
|
||||
# necessitating the creation of separate indices for each label.
|
||||
for k in message.msg_to:
|
||||
self.index[k].append(message)
|
||||
if message.cause_by:
|
||||
self.index[message.cause_by].append(message)
|
||||
|
||||
def add_batch(self, messages: Iterable[Message]):
|
||||
for message in messages:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue