From 3a3388375be05758d5f5574cce1d0f8eb7bdd604 Mon Sep 17 00:00:00 2001 From: sigoden Date: Wed, 4 Dec 2024 21:03:59 +0800 Subject: 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 --- src/config/agent.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/config/agent.rs') 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(), } }; -- cgit v1.2.3