mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-11-24 04:19:48 +01:00
Merge pull request #1249 from xinnan-tech/manager-local-mem
fix:short_momery可能为空的bug
This commit is contained in:
commit
96008fa78f
1 changed files with 1 additions and 1 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue