mirror of
https://github.com/meilisearch/meilisearch.git
synced 2025-07-26 16:21:07 +00:00
Make sure the new filter chat setting is set to it's default value if
missing
This commit is contained in:
@ -168,11 +168,18 @@ pub struct ChatCompletionPrompts {
|
|||||||
pub search_description: String,
|
pub search_description: String,
|
||||||
#[serde(default)]
|
#[serde(default)]
|
||||||
pub search_q_param: String,
|
pub search_q_param: String,
|
||||||
|
#[serde(default = "default_search_filter_param")]
|
||||||
pub search_filter_param: String,
|
pub search_filter_param: String,
|
||||||
#[serde(default)]
|
#[serde(default)]
|
||||||
pub search_index_uid_param: String,
|
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 {
|
impl Default for ChatCompletionPrompts {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
Self {
|
Self {
|
||||||
|
Reference in New Issue
Block a user