generate code refactored
This commit is contained in:
@@ -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"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
@@ -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#"
|
||||
{
|
||||
|
||||
@@ -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#"
|
||||
{
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user