From f0c95bc987fbf48a576f590873528063311fa95a Mon Sep 17 00:00:00 2001 From: Sakura-RanChen <1908198662@qq.com> Date: Mon, 12 Jan 2026 15:06:38 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=BA=E7=A9=BA=E6=97=B6=E4=B8=8D=E5=81=9A?= =?UTF-8?q?=E7=9B=B8=E5=85=B3=E6=9F=A5=E8=AF=A2=EF=BC=88=E5=B7=A5=E5=85=B7?= =?UTF-8?q?=E8=B0=83=E7=94=A8function=5Fcall=E6=97=B6=E6=B2=A1=E6=9C=89?= =?UTF-8?q?=E7=9B=B8=E5=85=B3query=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main/xiaozhi-server/core/connection.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main/xiaozhi-server/core/connection.py b/main/xiaozhi-server/core/connection.py index 449fbd2d..d90b540f 100644 --- a/main/xiaozhi-server/core/connection.py +++ b/main/xiaozhi-server/core/connection.py @@ -836,7 +836,8 @@ class ConnectionHandler: try: # 使用带记忆的对话 memory_str = None - if self.memory is not None: + # 仅当query非空(代表用户询问)时查询记忆 + if self.memory is not None and query: future = asyncio.run_coroutine_threadsafe( self.memory.query_memory(query), self.loop )