Skip to content

Commit 96008fa

Browse files
authored
Merge pull request #1249 from xinnan-tech/manager-local-mem
fix:short_momery可能为空的bug
2 parents 67e6a22 + da4d0f5 commit 96008fa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

main/xiaozhi-server/core/providers/memory/mem_local_short/mem_local_short.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ async def save_memory(self, msgs):
153153
msgStr += f"User: {msg.content}\n"
154154
elif msg.role == "assistant":
155155
msgStr += f"Assistant: {msg.content}\n"
156-
if len(self.short_momery) > 0:
156+
if self.short_momery and len(self.short_momery) > 0:
157157
msgStr += "历史记忆:\n"
158158
msgStr += self.short_momery
159159

0 commit comments

Comments
 (0)