From adf99fa4ef7ded859114617535eb3f12fd267308 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Ba=C4=8Do?= Date: Tue, 5 Sep 2023 16:12:38 +0200 Subject: [PATCH 1/3] Fix AI assistant headers for console user --- src/lib/commandCenter/panels/ai.svelte | 1 - 1 file changed, 1 deletion(-) diff --git a/src/lib/commandCenter/panels/ai.svelte b/src/lib/commandCenter/panels/ai.svelte index f2887239b1..e940248165 100644 --- a/src/lib/commandCenter/panels/ai.svelte +++ b/src/lib/commandCenter/panels/ai.svelte @@ -15,7 +15,6 @@ const { input, handleSubmit, completion, isLoading, complete, error } = useCompletion({ api: endpoint + '/console/assistant', headers: { - 'x-appwrite-mode': 'admin', 'content-type': 'application/json' } }); From b8ba4ac99567a22456110f47b651925c60b4b48d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Ba=C4=8Do?= Date: Tue, 5 Sep 2023 16:31:20 +0200 Subject: [PATCH 2/3] Fix missing credentials --- src/lib/commandCenter/panels/ai.svelte | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib/commandCenter/panels/ai.svelte b/src/lib/commandCenter/panels/ai.svelte index e940248165..5fd3d8b652 100644 --- a/src/lib/commandCenter/panels/ai.svelte +++ b/src/lib/commandCenter/panels/ai.svelte @@ -16,7 +16,8 @@ api: endpoint + '/console/assistant', headers: { 'content-type': 'application/json' - } + }, + credentials: 'include' }); let question = $input; From 0bca11d4260afa2c780a35f803647bb6146a5516 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Ba=C4=8Do?= Date: Wed, 6 Sep 2023 17:26:21 +0200 Subject: [PATCH 3/3] Set AI project --- src/lib/commandCenter/panels/ai.svelte | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib/commandCenter/panels/ai.svelte b/src/lib/commandCenter/panels/ai.svelte index 5fd3d8b652..1c589e1387 100644 --- a/src/lib/commandCenter/panels/ai.svelte +++ b/src/lib/commandCenter/panels/ai.svelte @@ -15,7 +15,8 @@ const { input, handleSubmit, completion, isLoading, complete, error } = useCompletion({ api: endpoint + '/console/assistant', headers: { - 'content-type': 'application/json' + 'content-type': 'application/json', + 'x-appwrite-project': 'console' }, credentials: 'include' });