区分合并工具调用缺失错误
恢复缺失工具调用的独立日志阶段和提示
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
use crate::config::build_game_creator_llm_client_from_llm_config;
|
||||
use crate::config::load_game_creator_app_config;
|
||||
use crate::ui_editor::commands::utils::{
|
||||
request_ui_editor_llm, required_tool_arguments, strict_json_schema,
|
||||
parse_limited_llm_tool_arguments, request_ui_editor_llm, required_tool_call_arguments,
|
||||
strict_json_schema,
|
||||
};
|
||||
use crate::ui_editor::state::{State, UITree};
|
||||
use platform_llm::{LlmFunctionTool, LlmMessage, LlmRunRequest, LlmToolChoice};
|
||||
@@ -487,7 +488,11 @@ pub(crate) async fn merge_ui_impl_with_provider(
|
||||
app_log!("ui_merge.error stage=llm_request error={error}");
|
||||
format!("UI 树合并失败:{error}")
|
||||
})?;
|
||||
let arguments = required_tool_arguments(&response, MERGE_TOOL_NAME).map_err(|error| {
|
||||
let arguments = required_tool_call_arguments(&response, MERGE_TOOL_NAME).map_err(|error| {
|
||||
app_log!("ui_merge.error stage=parse_tool_call reason=missing_tool_call error={error}");
|
||||
format!("LLM 未返回 {MERGE_TOOL_NAME} 工具调用")
|
||||
})?;
|
||||
let arguments = parse_limited_llm_tool_arguments(arguments).map_err(|error| {
|
||||
app_log!("ui_merge.error stage=parse_arguments error={error}");
|
||||
format!("UI 合并工具参数无效:{error}")
|
||||
})?;
|
||||
|
||||
Reference in New Issue
Block a user