mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-07-22 07:03:53 +08:00
为空时不做相关查询(工具调用function_call时没有相关query)
This commit is contained in:
@@ -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
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user