From 06a099e159ea38b4b70d14d97f76ffa37f260170 Mon Sep 17 00:00:00 2001 From: Accusys Date: Thu, 8 Oct 2026 09:30:48 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=BB=B6=E9=95=B7=20VLM=20timeout=20120?= =?UTF-8?q?s=E2=86=92300s=EF=BC=88vlm=5Fsummary=E3=80=81agent=20analyze=5F?= =?UTF-8?q?frame=E3=80=81backfill=5Ftrace=5Fvlm=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/bin/backfill_trace_vlm.rs | 2 +- src/core/agent/tools.rs | 6 ++++-- src/core/processor/vlm_summary.rs | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/bin/backfill_trace_vlm.rs b/src/bin/backfill_trace_vlm.rs index 3849a8cd..2cb10405 100644 --- a/src/bin/backfill_trace_vlm.rs +++ b/src/bin/backfill_trace_vlm.rs @@ -150,7 +150,7 @@ async fn process_trace(file_uuid: &str, trace_id: i32) -> Result "Summarize this key frame.", vec![base64_img], 512, - 120, + 300, ) .await?; diff --git a/src/core/agent/tools.rs b/src/core/agent/tools.rs index c11af090..7bf2058a 100644 --- a/src/core/agent/tools.rs +++ b/src/core/agent/tools.rs @@ -956,7 +956,7 @@ pub async fn exec_analyze_frame( let system_prompt = "你是一個專業的影片畫面分析助手。請根據提供的畫面以及用戶的問題,詳細描述畫面中的內容,包括場景、人物、動作、表情、物件等。請用繁體中文回答。"; - let vision_result = call_llm_vision(system_prompt, question, vec![base64_img], 1024, 120) + let vision_result = call_llm_vision(system_prompt, question, vec![base64_img], 1024, 300) .await .map_err(|e| e.to_string())?; @@ -1219,7 +1219,9 @@ pub async fn exec_search_by_appearance( )?; let output_dir = crate::core::config::OUTPUT_DIR.to_string(); - let scripts_dir = crate::core::path_utils::scripts_dir().to_string_lossy().to_string(); + let scripts_dir = crate::core::path_utils::scripts_dir() + .to_string_lossy() + .to_string(); let script_path = format!("{}/clothing_color_search.py", scripts_dir); let appearance_path = format!("{}/{}.appearance.json", output_dir, file_uuid); let output_path = format!("{}/{}.color_search_{}.json", output_dir, file_uuid, color); diff --git a/src/core/processor/vlm_summary.rs b/src/core/processor/vlm_summary.rs index c1d162d1..d0e192ae 100644 --- a/src/core/processor/vlm_summary.rs +++ b/src/core/processor/vlm_summary.rs @@ -253,7 +253,7 @@ async fn process_single_trace( user_prompt, vec![base64_img], max_tokens, - 120, + 300, ) .await {