cli add about gguf param

This commit is contained in:
jhqxxx
2026-03-17 15:39:34 +08:00
parent 80d36b5308
commit fb4a50f745
19 changed files with 403 additions and 104 deletions
+29 -8
View File
@@ -24,16 +24,19 @@ impl ExecModel for Qwen3vlExec {
let mut model = Qwen3VLGenerateModel::init(weight_path, None, None)?;
let i_duration = i_start.elapsed();
println!("Time elapsed in load model is: {:?}", i_duration);
let url = &input[1];
let input_url = if url.starts_with("http://")
|| url.starts_with("https://")
|| url.starts_with("file://")
let url = input.get(1);
let input_url = if let Some(url) = url
&& (url.starts_with("http://")
|| url.starts_with("https://")
|| url.starts_with("file://"))
{
url.clone()
Some(url.clone())
} else {
format!("file://{}", url)
url.map(|url| format!("file://{}", url))
};
let message = if input_url.ends_with("mp4") {
let message = if let Some(input_url) = &input_url
&& input_url.ends_with("mp4")
{
format!(
r#"{{
"model": "qwen3vl",
@@ -58,7 +61,7 @@ impl ExecModel for Qwen3vlExec {
}}"#,
input_url, target_text
)
} else {
} else if let Some(input_url) = &input_url {
format!(
r#"{{
"model": "qwen3vl",
@@ -82,6 +85,24 @@ impl ExecModel for Qwen3vlExec {
}}"#,
input_url, target_text
)
} else {
format!(
r#"{{
"model": "qwen3vl",
"messages": [
{{
"role": "user",
"content": [
{{
"type": "text",
"text": "{}"
}}
]
}}
]
}}"#,
target_text
)
};
let mes = serde_json::from_str(&message)?;