Skip to content

Commit 6bd140d

Browse files
author
yunjiu
committed
[bugfix][memory]modified get_msg_by_role_name func
1 parent 8f67f66 commit 6bd140d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

muagent/connector/memory_manager.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -870,7 +870,8 @@ def init_global_msg(self, chat_index: str, role_name: str, role_content: str, ro
870870
return False
871871

872872
def get_msg_by_role_name(self, chat_index: str, role_name: str) -> Optional[Message]:
873-
memory = self.get_memory_pool(chat_index)
873+
memory = self.get_memory_pool_by_all({"chat_index": chat_index, "role_name": role_name})
874+
# memory = self.get_memory_pool(chat_index)
874875
for msg in memory.messages:
875876
if msg.role_name == role_name:
876877
return msg

0 commit comments

Comments
 (0)