fix: chat memory extraction crashes on a non-dict message (#1749)
This commit is contained in:
@@ -51,6 +51,8 @@ class MemoryManager:
|
||||
memories = []
|
||||
|
||||
for msg in chat_history:
|
||||
if not isinstance(msg, dict):
|
||||
continue
|
||||
if msg.get("role") == "assistant":
|
||||
content = str(msg.get("content", ""))
|
||||
lines = content.split('\n')
|
||||
|
||||
Reference in New Issue
Block a user