mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-07-22 07:03:53 +08:00
Merge pull request #1249 from xinnan-tech/manager-local-mem
fix:short_momery可能为空的bug
This commit is contained in:
@@ -153,7 +153,7 @@ class MemoryProvider(MemoryProviderBase):
|
||||
msgStr += f"User: {msg.content}\n"
|
||||
elif msg.role == "assistant":
|
||||
msgStr += f"Assistant: {msg.content}\n"
|
||||
if len(self.short_momery) > 0:
|
||||
if self.short_momery and len(self.short_momery) > 0:
|
||||
msgStr += "历史记忆:\n"
|
||||
msgStr += self.short_momery
|
||||
|
||||
|
||||
Reference in New Issue
Block a user