This commit is contained in:
Timothy Jaeryang Baek
2024-12-18 18:04:56 -08:00
parent 5871df02ac
commit 0f6d302760
8 changed files with 41 additions and 36 deletions
+1 -1
View File
@@ -45,7 +45,7 @@ type YoutubeConfigForm = {
type RAGConfigForm = {
pdf_extract_images?: boolean;
enable_google_drive?: boolean;
enable_google_drive_integration?: boolean;
chunk?: ChunkConfigForm;
content_extraction?: ContentExtractConfigForm;
web_loader_ssl_verification?: boolean;
@@ -56,7 +56,7 @@
let chunkOverlap = 0;
let pdfExtractImages = true;
let enableGoogleDrive = false;
let enableGoogleDriveIntegration = false;
let OpenAIUrl = '';
let OpenAIKey = '';
@@ -177,7 +177,7 @@
}
const res = await updateRAGConfig(localStorage.token, {
pdf_extract_images: pdfExtractImages,
enable_google_drive: enableGoogleDrive,
enable_google_drive_integration: enableGoogleDriveIntegration,
file: {
max_size: fileMaxSize === '' ? null : fileMaxSize,
max_count: fileMaxCount === '' ? null : fileMaxCount
@@ -249,7 +249,7 @@
fileMaxSize = res?.file.max_size ?? '';
fileMaxCount = res?.file.max_count ?? '';
enableGoogleDrive = res.enable_google_drive;
enableGoogleDrive = res.enable_google_drive_integration;
}
});
</script>
@@ -598,7 +598,7 @@
<div class="flex justify-between items-center text-xs">
<div class="text-xs font-medium">{$i18n.t('Enable Google Drive')}</div>
<div>
<Switch bind:state={enableGoogleDrive} />
<Switch bind:state={enableGoogleDriveIntegration} />
</div>
</div>
</div>
@@ -154,7 +154,7 @@
<div class="line-clamp-1">{$i18n.t('Upload Files')}</div>
</DropdownMenu.Item>
{#if $config?.features?.enable_google_drive}
{#if $config?.features?.enable_google_drive_integration}
<DropdownMenu.Item
class="flex gap-2 items-center px-3 py-2 text-sm font-medium cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-xl"
on:click={() => {
+1 -1
View File
@@ -176,7 +176,7 @@ type Config = {
enable_signup: boolean;
enable_login_form: boolean;
enable_web_search?: boolean;
enable_google_drive: boolean;
enable_google_drive_integration: boolean;
enable_image_generation: boolean;
enable_admin_export: boolean;
enable_admin_chat_access: boolean;