删除无人调用的 required_tool_arguments 组合封装
ui_editor/commands/utils.rs 去掉只做「找工具调用 + 解析参数」拼接的封装,识别与切分调用点都自带日志与错误映射,没有消费方
This commit is contained in:
@@ -95,17 +95,6 @@ pub(crate) fn parse_limited_llm_tool_arguments(
|
||||
serde_json::from_str(arguments).map_err(|error| format!("LLM 工具参数不是有效 JSON:{error}"))
|
||||
}
|
||||
|
||||
/// Stable structured-action adapter: locate the required tool call and parse its
|
||||
/// bounded JSON arguments. Prompt, schema and materialization stay in each
|
||||
/// operation-specific command.
|
||||
pub(crate) fn required_tool_arguments(
|
||||
response: &LlmRunResponse,
|
||||
tool_name: &str,
|
||||
) -> Result<serde_json::Value, String> {
|
||||
let arguments = required_tool_call_arguments(response, tool_name)?;
|
||||
parse_limited_llm_tool_arguments(arguments)
|
||||
}
|
||||
|
||||
pub(crate) fn required_tool_call_arguments<'a>(
|
||||
response: &'a LlmRunResponse,
|
||||
tool_name: &str,
|
||||
|
||||
Reference in New Issue
Block a user