mirror of
https://github.com/meilisearch/meilisearch.git
synced 2025-10-10 13:46:28 +00:00
Override "default" source base url with the config one
This commit is contained in:
@@ -24,8 +24,9 @@ impl Config {
|
|||||||
if let Some(api_key) = chat_settings.api_key.as_ref() {
|
if let Some(api_key) = chat_settings.api_key.as_ref() {
|
||||||
config = config.with_api_key(api_key);
|
config = config.with_api_key(api_key);
|
||||||
}
|
}
|
||||||
|
// config base url always overrides the one from the source
|
||||||
let base_url = chat_settings.base_url.as_deref();
|
let base_url = chat_settings.base_url.as_deref();
|
||||||
if let Some(base_url) = chat_settings.source.base_url().or(base_url) {
|
if let Some(base_url) = base_url.or(chat_settings.source.base_url()) {
|
||||||
config = config.with_api_base(base_url);
|
config = config.with_api_base(base_url);
|
||||||
}
|
}
|
||||||
Self::OpenAiCompatible(config)
|
Self::OpenAiCompatible(config)
|
||||||
|
Reference in New Issue
Block a user