mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-06-14 20:11:38 +02:00
Redact the API Key when patching chat workspace settings
This commit is contained in:
parent
48e8356a16
commit
a7f5d3bb7a
@ -103,7 +103,7 @@ async fn patch_settings(
|
|||||||
Setting::NotSet => old_settings.prompts,
|
Setting::NotSet => old_settings.prompts,
|
||||||
};
|
};
|
||||||
|
|
||||||
let settings = ChatCompletionSettings {
|
let mut settings = ChatCompletionSettings {
|
||||||
source: match new.source {
|
source: match new.source {
|
||||||
Setting::Set(new_source) => new_source.into(),
|
Setting::Set(new_source) => new_source.into(),
|
||||||
Setting::Reset => DbChatCompletionSource::default(),
|
Setting::Reset => DbChatCompletionSource::default(),
|
||||||
@ -154,6 +154,8 @@ async fn patch_settings(
|
|||||||
index_scheduler.put_chat_settings(&mut wtxn, &workspace_uid, &settings)?;
|
index_scheduler.put_chat_settings(&mut wtxn, &workspace_uid, &settings)?;
|
||||||
wtxn.commit()?;
|
wtxn.commit()?;
|
||||||
|
|
||||||
|
settings.hide_secrets();
|
||||||
|
|
||||||
Ok(HttpResponse::Ok().json(settings))
|
Ok(HttpResponse::Ok().json(settings))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user