Make sure the new filter chat setting is set to it's default value if

missing
This commit is contained in:
Clément Renault
2025-07-17 15:28:18 +02:00
parent a005a062da
commit f1d92bfead

View File

@ -168,11 +168,18 @@ pub struct ChatCompletionPrompts {
pub search_description: String,
#[serde(default)]
pub search_q_param: String,
#[serde(default = "default_search_filter_param")]
pub search_filter_param: String,
#[serde(default)]
pub search_index_uid_param: String,
}
/// This function is used for when the search_filter_param is
/// not provided and this can happen when the database is in v1.15.
fn default_search_filter_param() -> String {
DEFAULT_CHAT_SEARCH_FILTER_PARAM_PROMPT.to_string()
}
impl Default for ChatCompletionPrompts {
fn default() -> Self {
Self {