mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-07-27 17:43:55 +08:00
为空时不做相关查询(工具调用function_call时没有相关query)
This commit is contained in:
@@ -836,7 +836,8 @@ class ConnectionHandler:
|
|||||||
try:
|
try:
|
||||||
# 使用带记忆的对话
|
# 使用带记忆的对话
|
||||||
memory_str = None
|
memory_str = None
|
||||||
if self.memory is not None:
|
# 仅当query非空(代表用户询问)时查询记忆
|
||||||
|
if self.memory is not None and query:
|
||||||
future = asyncio.run_coroutine_threadsafe(
|
future = asyncio.run_coroutine_threadsafe(
|
||||||
self.memory.query_memory(query), self.loop
|
self.memory.query_memory(query), self.loop
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user