Skip to content

Commit

Permalink
minor
Browse files Browse the repository at this point in the history
  • Loading branch information
olegklimov committed Dec 14, 2023
1 parent 71be516 commit 1444858
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/cached_tokenizers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ pub async fn cached_tokenizer(
http_path = caps_locked.tokenizer_path_template.replace("$MODEL", rewritten_model_name);();
}
_download_tokenizer_file(&client2, http_path.as_str(), cx_locked.cmdline.api_key.clone(), &path).await?;
info!("using tokenizer \"{}\"", path.display());
let tokenizer = Tokenizer::from_file(path).map_err(|e| format!("failed to load tokenizer: {}", e))?;
let arc = Arc::new(StdRwLock::new(tokenizer));
cx_locked.tokenizer_map.insert(model_name.clone(), arc.clone());
Expand Down
2 changes: 1 addition & 1 deletion src/forward_to_hf_endpoint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ pub async fn forward_to_hf_style_endpoint(
if status_code != 200 {
return Err(format!("{} status={} text {}", url, status_code, response_txt));
}
Ok(serde_json::from_str(&response_txt).unwrap())
Ok(serde_json::from_str(&response_txt).unwrap()) // FIXME: unwrap
}


Expand Down

0 comments on commit 1444858

Please sign in to comment.