summaryrefslogtreecommitdiffstats
path: root/src/config/agent.rs
diff options
context:
space:
mode:
authorsigoden <sigoden@gmail.com>2024-12-04 21:03:59 +0800
committerGitHub <noreply@github.com>2024-12-04 21:03:59 +0800
commit3a3388375be05758d5f5574cce1d0f8eb7bdd604 (patch)
treecc8e19e218c20f28a04feca33850fce4bb2cbe98 /src/config/agent.rs
parent7d42fe9429f75d195f865b07cef10d040d5397f2 (diff)
downloadaichat-3a3388375be05758d5f5574cce1d0f8eb7bdd604.tar.gz
refactor: improve retrieve model (#1036)
- check the model type while retrieve model - select chat/reranker model even if it is missed in client models - find predefined-models for openai-compatible client with startsWith - remove client::ApiType
Diffstat (limited to 'src/config/agent.rs')
-rw-r--r--src/config/agent.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/config/agent.rs b/src/config/agent.rs
index 5e54b26..c81ed11 100644
--- a/src/config/agent.rs
+++ b/src/config/agent.rs
@@ -61,7 +61,7 @@ impl Agent {
let model = {
let config = config.read();
match agent_config.model_id.as_ref() {
- Some(model_id) => Model::retrieve_chat(&config, model_id)?,
+ Some(model_id) => Model::retrieve_model(&config, model_id, ModelType::Chat)?,
None => config.current_model().clone(),
}
};