feat:提高工具调用成功率,移除冗余的描述中参数介绍,增加索引列表的描述,修改prompt,移除timing的wait打断

This commit is contained in:
SengokuCola
2026-04-10 00:45:32 +08:00
parent 0852c38e81
commit fee9341620
17 changed files with 828 additions and 450 deletions

View File

@@ -29,6 +29,6 @@ async def handle_tool(
tool_ctx.runtime._enter_stop_state()
return tool_ctx.build_success_result(
invocation.tool_name,
"当前对话循环已结束本轮思考,等待新的外部消息到来。",
"当前对话循环已结束本轮思考,等待新的消息到来。",
metadata={"pause_execution": True},
)

View File

@@ -29,6 +29,6 @@ async def handle_tool(
tool_ctx.runtime._enter_stop_state()
return tool_ctx.build_success_result(
invocation.tool_name,
"当前对话循环已暂停,等待新消息到来。",
"当前暂时停止思考,等待新消息到来。",
metadata={"pause_execution": True},
)

View File

@@ -91,10 +91,6 @@ async def handle_tool(
f"未找到要回复的目标消息msg_id={target_message_id}",
)
logger.info(
f"{tool_ctx.runtime.log_prefix} 已触发回复工具,"
f"目标消息编号={target_message_id} 引用回复={set_quote} 最新思考={latest_thought!r}"
)
try:
replyer = replyer_manager.get_replyer(
chat_stream=tool_ctx.runtime.chat_stream,