update:优化工具回复

This commit is contained in:
hrz
2025-06-26 11:27:23 +08:00
parent 2f78acaf4d
commit 0f36daf1fd
12 changed files with 108 additions and 195 deletions
@@ -108,15 +108,12 @@ async def process_intent_result(conn, intent_result, original_text):
# 使用统一工具处理器处理所有工具调用
try:
tool_result = asyncio.run_coroutine_threadsafe(
result = asyncio.run_coroutine_threadsafe(
conn.func_handler.handle_llm_function_call(
conn, function_call_data
),
conn.loop,
).result()
# 转换ToolResult为ActionResponse
result = conn._convert_tool_result_to_action_response(tool_result)
except Exception as e:
conn.logger.bind(tag=TAG).error(f"工具调用失败: {e}")
result = ActionResponse(