merge main

This commit is contained in:
jhqxxx
2026-02-02 17:56:34 +08:00
28 changed files with 2881 additions and 84 deletions
+15 -1
View File
@@ -4,7 +4,7 @@ pub mod tensor_utils;
pub mod video_utils;
use std::io::Read;
use std::{collections::HashMap, fs, process::Command, time::Duration};
use std::{collections::HashMap, fs, path::PathBuf, process::Command, time::Duration};
use aha_openai_dive::v1::resources::{
chat::{
@@ -758,3 +758,17 @@ pub async fn download_model(
}
}
}
pub fn get_file_path(file: &str) -> Result<PathBuf> {
let path = url::Url::parse(file)?;
let path = path.to_file_path();
let path = match path {
Ok(path) => path,
Err(_) => {
let mut path = file.to_owned();
path = path.split_off(7);
PathBuf::from(path)
}
};
Ok(path)
}