Introduce the new index chat settings

This commit is contained in:
Clément Renault 2025-05-21 11:07:06 +02:00
parent 439146289e
commit c6930c8819
No known key found for this signature in database
GPG key ID: F250A4C4E3AE5F5F
12 changed files with 227 additions and 21 deletions

View file

@ -30,7 +30,7 @@ use serde_json::json;
use tokio::runtime::Handle;
use tokio::sync::mpsc::error::SendError;
use super::settings::chat::{ChatPrompts, ChatSettings};
use super::settings::chat::{ChatPrompts, GlobalChatSettings};
use crate::extractors::authentication::policies::ActionPolicy;
use crate::extractors::authentication::{extract_token_from_request, GuardedData, Policy as _};
use crate::metrics::MEILISEARCH_DEGRADED_SEARCH_REQUESTS;
@ -216,7 +216,7 @@ async fn non_streamed_chat(
let chat_settings = match index_scheduler.chat_settings().unwrap() {
Some(value) => serde_json::from_value(value).unwrap(),
None => ChatSettings::default(),
None => GlobalChatSettings::default(),
};
let mut config = OpenAIConfig::default();
@ -307,7 +307,7 @@ async fn streamed_chat(
let chat_settings = match index_scheduler.chat_settings().unwrap() {
Some(value) => serde_json::from_value(value).unwrap(),
None => ChatSettings::default(),
None => GlobalChatSettings::default(),
};
let mut config = OpenAIConfig::default();