Update crates/tabby-download/src/lib.rs
parent
67d407779c
commit
8898045fa8
|
|
@ -57,6 +57,7 @@ impl CacheInfo {
|
|||
}
|
||||
|
||||
pub async fn download_model(model_id: &str, prefer_local_file: bool) -> Result<()> {
|
||||
tracing::info!("Starting to download model: {}", model_id);
|
||||
if fs::metadata(model_id).is_ok() {
|
||||
// Local path, no need for downloading.
|
||||
return Ok(());
|
||||
|
|
@ -97,6 +98,7 @@ pub async fn download_model(model_id: &str, prefer_local_file: bool) -> Result<(
|
|||
}
|
||||
|
||||
cache_info.save(model_id)?;
|
||||
tracing::info!("Model download successful: {}", model_id);
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue