Skip to content

Commit

Permalink
Merge branch 'assistant_ui_settings' into 'master'
Browse files Browse the repository at this point in the history
Private chats

See merge request postgres-ai/database-lab!913
  • Loading branch information
Bogdan Tsechoev committed Nov 21, 2024
2 parents 98bf221 + 9e2b1a7 commit da016ea
Show file tree
Hide file tree
Showing 16 changed files with 577 additions and 295 deletions.
11 changes: 2 additions & 9 deletions ui/packages/platform/src/api/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -453,20 +453,13 @@ class Api {

updateAiBotSettings(token, orgId, orgData) {
let params = {};
let data = {};
let headers = {
Authorization: 'Bearer ' + token,
prefer: 'return=representation'
};

// if (typeof orgData.custom_prompt !== 'undefined') {
// data.custom_prompt = orgData.custom_prompt;
// }
if (typeof orgData.model !== 'undefined') {
data.ai_model = orgData.model;
}
params.data = {
ai_bot: data
if (typeof orgData.is_chat_public_by_default !== 'undefined') {
params.is_chat_public_by_default = orgData.is_chat_public_by_default;
}

return this.patch(`${this.apiServer}/orgs?id=eq.` + orgId, params, {
Expand Down
Loading

0 comments on commit da016ea

Please sign in to comment.