From d43ca803ca9328d5195c121eebace2c7f8227df9 Mon Sep 17 00:00:00 2001 From: Taylor Wilsdon Date: Wed, 18 Dec 2024 13:24:11 -0500 Subject: [PATCH] feat: Add Google Drive integration toggle to document settings --- .../admin/Settings/Documents.svelte | 26 +++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/src/lib/components/admin/Settings/Documents.svelte b/src/lib/components/admin/Settings/Documents.svelte index a596c293c..71bf5a80e 100644 --- a/src/lib/components/admin/Settings/Documents.svelte +++ b/src/lib/components/admin/Settings/Documents.svelte @@ -56,6 +56,8 @@ let chunkOverlap = 0; let pdfExtractImages = true; + let enableGoogleDrive = false; + let OpenAIUrl = ''; let OpenAIKey = ''; @@ -175,6 +177,7 @@ } const res = await updateRAGConfig(localStorage.token, { pdf_extract_images: pdfExtractImages, + enable_google_drive: enableGoogleDrive, file: { max_size: fileMaxSize === '' ? null : fileMaxSize, max_count: fileMaxCount === '' ? null : fileMaxCount @@ -187,7 +190,7 @@ content_extraction: { engine: contentExtractionEngine, tika_server_url: tikaServerUrl - } + }, }); await updateQuerySettings(localStorage.token, querySettings); @@ -245,6 +248,8 @@ fileMaxSize = res?.file.max_size ?? ''; fileMaxCount = res?.file.max_count ?? ''; + + enableGoogleDrive = res.enable_google_drive; } }); @@ -571,7 +576,9 @@ - {#if showTikaServerUrl} +
+ + {#if showTikaServerUrl}
{/if}
+ +
+
+ +
{$i18n.t('Google Drive')}
+ +
+
+
{$i18n.t('Enable Google Drive')}
+
+ +
+
+
+