为空时不做相关查询(工具调用function_call时没有相关query)

This commit is contained in:
Sakura-RanChen
2026-01-12 15:06:38 +08:00
parent c4fc510a27
commit f0c95bc987
+2 -1
View File
@@ -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
)