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

sweep/improve-logging
sweep-ai[bot] 2023-07-27 10:01:52 +00:00 committed by GitHub
parent 67d407779c
commit 8898045fa8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -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(())
}