summaryrefslogtreecommitdiffstats
path: root/src/client/model.rs
diff options
context:
space:
mode:
authorsigoden <sigoden@gmail.com>2024-07-27 15:50:08 +0800
committerGitHub <noreply@github.com>2024-07-27 15:50:08 +0800
commit74c86babed710149bea45529362ce6f2815c72d8 (patch)
treea7ce7481c7f990f38220b5be567d18daf681e239 /src/client/model.rs
parent9030f3b27bc93fe25ee5457579c715f8c1c0cd91 (diff)
downloadaichat-74c86babed710149bea45529362ce6f2815c72d8.tar.gz
feat: abandon AICHAT_PLATFORM and several improvements (#752)
Diffstat (limited to 'src/client/model.rs')
-rw-r--r--src/client/model.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/client/model.rs b/src/client/model.rs
index acf04a3..17646c9 100644
--- a/src/client/model.rs
+++ b/src/client/model.rs
@@ -45,21 +45,21 @@ impl Model {
pub fn retrieve_chat(config: &Config, model_id: &str) -> Result<Self> {
match Self::find(&list_chat_models(config), model_id) {
Some(v) => Ok(v),
- None => bail!("Invalid chat model '{model_id}'"),
+ None => bail!("Unknown chat model '{model_id}'"),
}
}
pub fn retrieve_embedding(config: &Config, model_id: &str) -> Result<Self> {
match Self::find(&list_embedding_models(config), model_id) {
Some(v) => Ok(v),
- None => bail!("Invalid embedding model '{model_id}'"),
+ None => bail!("Unknown embedding model '{model_id}'"),
}
}
pub fn retrieve_reranker(config: &Config, model_id: &str) -> Result<Self> {
match Self::find(&list_reranker_models(config), model_id) {
Some(v) => Ok(v),
- None => bail!("Invalid reranker model '{model_id}'"),
+ None => bail!("Unknown reranker model '{model_id}'"),
}
}