Make the chats settings and chat completions route experimental

This commit is contained in:
Kerollmops 2025-05-30 15:56:57 +02:00 committed by Clément Renault
parent ae135d1d46
commit 3b931e75d9
No known key found for this signature in database
GPG key ID: F250A4C4E3AE5F5F
7 changed files with 37 additions and 3 deletions

View file

@ -38,6 +38,8 @@ async fn get_settings(
>,
chats_param: web::Path<ChatsParam>,
) -> Result<HttpResponse, ResponseError> {
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 ???
@ -63,6 +65,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")?;
let ChatsParam { workspace_uid } = chats_param.into_inner();
// TODO do a spawn_blocking here
@ -143,6 +146,8 @@ async fn delete_settings(
>,
chats_param: web::Path<ChatsParam>,
) -> Result<HttpResponse, ResponseError> {
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