generate code refactored

This commit is contained in:
jhqxxx
2026-05-29 22:10:40 +08:00
parent 257057de07
commit 791f3ea7e3
18 changed files with 182 additions and 686 deletions
+1 -1
View File
@@ -21,7 +21,7 @@ fn fun_asr_nano_generate() -> Result<()> {
"type": "audio",
"audio_url":
{
"url": "file://./assets/audio/voice_01.wav"
"url": "https://package-release.coderbox.cn/aiway/test/other/%E5%93%AA%E5%90%92.wav"
}
},
{
+1 -1
View File
@@ -22,7 +22,7 @@ fn glm_asr_nano_generate() -> Result<()> {
"type": "audio",
"audio_url":
{
"url": "file://./assets/audio/voice_01.wav"
"url": "https://package-release.coderbox.cn/aiway/test/other/%E5%93%AA%E5%90%92.wav"
}
},
{
+1 -1
View File
@@ -52,7 +52,7 @@ fn glm_ocr_generate() -> Result<()> {
#[tokio::test]
async fn glm_ocr_stream() -> Result<()> {
// test with cuda: RUST_BACKTRACE=1 cargo test -F cuda glm_ocr_stream -r -- --nocapture
// test with cuda: RUST_BACKTRACE=1 cargo test -F cuda --test test_glm_ocr glm_ocr_stream -r -- --nocapture
let message = r#"
{
+1 -1
View File
@@ -49,7 +49,7 @@ fn hunyuan_ocr_generate() -> Result<()> {
#[tokio::test]
async fn hunyuan_ocr_stream() -> Result<()> {
// test with cuda: RUST_BACKTRACE=1 cargo test -F cuda hunyuan_ocr_stream -r -- --nocapture
// test with cuda: RUST_BACKTRACE=1 cargo test -F cuda --test test_hunyuan_ocr hunyuan_ocr_stream -r -- --nocapture
let message = r#"
{
+1 -1
View File
@@ -60,7 +60,7 @@ async fn lfm2vl_stream() -> Result<()> {
let save_dir =
aha::utils::get_default_save_dir().ok_or(anyhow::anyhow!("Failed to get save dir"))?;
// let model_path = format!("{}/LiquidAI/LFM2-1.2B/", save_dir);
let model_path = format!("{}/LiquidAI/LFM2.5-VL-1.6B/", save_dir);
let model_path = format!("{}/LiquidAI/LFM2.5-VL-450M/", save_dir);
let message = r#"
{
"model": "lfm2vl",
+6 -6
View File
@@ -104,7 +104,7 @@ fn qwen3vl_generate() -> Result<()> {
#[tokio::test]
async fn qwen3vl_stream() -> Result<()> {
// test with cuda: RUST_BACKTRACE=1 cargo test -F cuda,ffmpeg qwen3vl_stream -r -- --nocapture
// test with cuda: RUST_BACKTRACE=1 cargo test -F cuda --test test_qwen3vl qwen3vl_stream -r -- --nocapture
let save_dir =
aha::utils::get_default_save_dir().ok_or(anyhow::anyhow!("Failed to get save dir"))?;
@@ -118,15 +118,15 @@ async fn qwen3vl_stream() -> Result<()> {
"role": "user",
"content": [
{
"type": "video",
"video_url":
"type": "image",
"image_url":
{
"url": "./assets/video/video_test.mp4"
"url": "file://./assets/img/ocr_test1.png"
}
},
},
{
"type": "text",
"text": "视频中发生了什么?"
"text": "OCR"
}
]
}