Update crates/tabby-download/src/lib.rs

sweep/improve-logging
sweep-ai[bot] 2023-07-27 10:12:32 +00:00 committed by GitHub
parent cf8e45121d
commit e0e2702d76
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -57,11 +57,11 @@ 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(());
}
tracing::info!("Starting to download model: {}", model_id);
let mut cache_info = CacheInfo::from(model_id).await;