Fix the chat completions feature gate

This commit is contained in:
Clément Renault 2025-06-03 17:10:53 +02:00
parent c4e1407e77
commit 28dc7b836b
No known key found for this signature in database
GPG key ID: F250A4C4E3AE5F5F
4 changed files with 20 additions and 7 deletions

View file

@ -37,7 +37,7 @@ async fn get_settings(
>,
chats_param: web::Path<ChatsParam>,
) -> Result<HttpResponse, ResponseError> {
index_scheduler.features().check_chat_completions("Using the /chats settings route")?;
index_scheduler.features().check_chat_completions("using the /chats/settings route")?;
let ChatsParam { workspace_uid } = chats_param.into_inner();
@ -64,7 +64,7 @@ async fn patch_settings(
chats_param: web::Path<ChatsParam>,
web::Json(new): web::Json<GlobalChatSettings>,
) -> Result<HttpResponse, ResponseError> {
index_scheduler.features().check_chat_completions("Using the /chats settings route")?;
index_scheduler.features().check_chat_completions("using the /chats/settings route")?;
let ChatsParam { workspace_uid } = chats_param.into_inner();
// TODO do a spawn_blocking here
@ -144,7 +144,7 @@ async fn delete_settings(
>,
chats_param: web::Path<ChatsParam>,
) -> Result<HttpResponse, ResponseError> {
index_scheduler.features().check_chat_completions("Using the /chats settings route")?;
index_scheduler.features().check_chat_completions("using the /chats/settings route")?;
let ChatsParam { workspace_uid } = chats_param.into_inner();