From c7f3af066eea718415736147237e7475cecd6ad9 Mon Sep 17 00:00:00 2001 From: Narek Galstyan Date: Mon, 29 Jan 2024 05:12:17 +0000 Subject: [PATCH] Print info about available models when model is not found --- lantern_embeddings_core/src/ort_runtime.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lantern_embeddings_core/src/ort_runtime.rs b/lantern_embeddings_core/src/ort_runtime.rs index d6560ef..fa5d9a5 100644 --- a/lantern_embeddings_core/src/ort_runtime.rs +++ b/lantern_embeddings_core/src/ort_runtime.rs @@ -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();