Merge branch 'fix-memory-opt' into 'mgx_ops'

check empty content

See merge request pub/MetaGPT!393
This commit is contained in:
张雷 2024-10-11 09:39:31 +00:00
commit be78b101af

View file

@ -129,7 +129,7 @@ class RoleZeroLongTermMemory(Memory):
If adding long-term memory fails, it will only log the error without interrupting program execution.
"""
if not item:
if not item or not item.message.content:
return
self.rag_engine.add_objs([item])