mirror of
				https://github.com/meilisearch/meilisearch.git
				synced 2025-10-31 16:06:31 +00:00 
			
		
		
		
	Rename base_api into base_rul
This commit is contained in:
		| @@ -59,7 +59,7 @@ pub struct ChatCompletionSettings { | ||||
|     #[serde(default)] | ||||
|     pub deployment_id: Option<String>, | ||||
|     #[serde(default)] | ||||
|     pub base_api: Option<String>, | ||||
|     pub base_url: Option<String>, | ||||
|     #[serde(default)] | ||||
|     pub api_key: Option<String>, | ||||
|     #[serde(default)] | ||||
|   | ||||
| @@ -24,8 +24,8 @@ impl Config { | ||||
|                 if let Some(api_key) = chat_settings.api_key.as_ref() { | ||||
|                     config = config.with_api_key(api_key); | ||||
|                 } | ||||
|                 if let Some(base_api) = chat_settings.base_api.as_ref() { | ||||
|                     config = config.with_api_base(base_api); | ||||
|                 if let Some(base_url) = chat_settings.base_url.as_ref() { | ||||
|                     config = config.with_api_base(base_url); | ||||
|                 } | ||||
|                 Self::OpenAiCompatible(config) | ||||
|             } | ||||
| @@ -40,8 +40,8 @@ impl Config { | ||||
|                 if let Some(api_key) = chat_settings.api_key.as_ref() { | ||||
|                     config = config.with_api_key(api_key); | ||||
|                 } | ||||
|                 if let Some(base_api) = chat_settings.base_api.as_ref() { | ||||
|                     config = config.with_api_base(base_api); | ||||
|                 if let Some(base_url) = chat_settings.base_url.as_ref() { | ||||
|                     config = config.with_api_base(base_url); | ||||
|                 } | ||||
|                 Self::AzureOpenAiCompatible(config) | ||||
|             } | ||||
|   | ||||
| @@ -129,10 +129,10 @@ async fn patch_settings( | ||||
|             Setting::Reset => None, | ||||
|             Setting::NotSet => old_settings.deployment_id, | ||||
|         }, | ||||
|         base_api: match new.base_api { | ||||
|             Setting::Set(new_base_api) => Some(new_base_api), | ||||
|         base_url: match new.base_url { | ||||
|             Setting::Set(new_base_url) => Some(new_base_url), | ||||
|             Setting::Reset => None, | ||||
|             Setting::NotSet => old_settings.base_api, | ||||
|             Setting::NotSet => old_settings.base_url, | ||||
|         }, | ||||
|         api_key: match new.api_key { | ||||
|             Setting::Set(new_api_key) => Some(new_api_key), | ||||
| @@ -211,7 +211,7 @@ pub struct GlobalChatSettings { | ||||
|     #[serde(default)] | ||||
|     #[deserr(default, error = DeserrJsonError<InvalidChatCompletionBaseApi>)] | ||||
|     #[schema(value_type = Option<String>, example = json!("https://api.mistral.ai/v1"))] | ||||
|     pub base_api: Setting<String>, | ||||
|     pub base_url: Setting<String>, | ||||
|     #[serde(default)] | ||||
|     #[deserr(default, error = DeserrJsonError<InvalidChatCompletionApiKey>)] | ||||
|     #[schema(value_type = Option<String>, example = json!("abcd1234..."))] | ||||
|   | ||||
		Reference in New Issue
	
	Block a user