Skip to content

Commit

Permalink
Print info about available models when model is not found
Browse files Browse the repository at this point in the history
  • Loading branch information
Ngalstyan4 committed Feb 4, 2024
1 parent a83507e commit c7f3af0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lantern_embeddings_core/src/ort_runtime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,11 @@ impl<'a> OrtRuntime<'a> {
let model_info = map.get(model_name);

if model_info.is_none() {
anyhow::bail!("Model \"{}\" not found", model_name)
anyhow::bail!(
"Model \"{}\" not found.\nAvailable models: {}",
model_name,
map.keys().join(", ")
)
}

let model_info = model_info.unwrap();
Expand Down

0 comments on commit c7f3af0

Please sign in to comment.