mirror of
https://github.com/open-webui/open-webui
synced 2025-01-01 08:42:14 +00:00
feat: Add Google Drive integration toggle to document settings
This commit is contained in:
parent
366158ff04
commit
d43ca803ca
@ -56,6 +56,8 @@
|
|||||||
let chunkOverlap = 0;
|
let chunkOverlap = 0;
|
||||||
let pdfExtractImages = true;
|
let pdfExtractImages = true;
|
||||||
|
|
||||||
|
let enableGoogleDrive = false;
|
||||||
|
|
||||||
let OpenAIUrl = '';
|
let OpenAIUrl = '';
|
||||||
let OpenAIKey = '';
|
let OpenAIKey = '';
|
||||||
|
|
||||||
@ -175,6 +177,7 @@
|
|||||||
}
|
}
|
||||||
const res = await updateRAGConfig(localStorage.token, {
|
const res = await updateRAGConfig(localStorage.token, {
|
||||||
pdf_extract_images: pdfExtractImages,
|
pdf_extract_images: pdfExtractImages,
|
||||||
|
enable_google_drive: enableGoogleDrive,
|
||||||
file: {
|
file: {
|
||||||
max_size: fileMaxSize === '' ? null : fileMaxSize,
|
max_size: fileMaxSize === '' ? null : fileMaxSize,
|
||||||
max_count: fileMaxCount === '' ? null : fileMaxCount
|
max_count: fileMaxCount === '' ? null : fileMaxCount
|
||||||
@ -187,7 +190,7 @@
|
|||||||
content_extraction: {
|
content_extraction: {
|
||||||
engine: contentExtractionEngine,
|
engine: contentExtractionEngine,
|
||||||
tika_server_url: tikaServerUrl
|
tika_server_url: tikaServerUrl
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
await updateQuerySettings(localStorage.token, querySettings);
|
await updateQuerySettings(localStorage.token, querySettings);
|
||||||
@ -245,6 +248,8 @@
|
|||||||
|
|
||||||
fileMaxSize = res?.file.max_size ?? '';
|
fileMaxSize = res?.file.max_size ?? '';
|
||||||
fileMaxCount = res?.file.max_count ?? '';
|
fileMaxCount = res?.file.max_count ?? '';
|
||||||
|
|
||||||
|
enableGoogleDrive = res.enable_google_drive;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
@ -571,6 +576,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<hr class=" dark:border-gray-850" />
|
||||||
|
|
||||||
{#if showTikaServerUrl}
|
{#if showTikaServerUrl}
|
||||||
<div class="flex w-full mt-1">
|
<div class="flex w-full mt-1">
|
||||||
<div class="flex-1 mr-2">
|
<div class="flex-1 mr-2">
|
||||||
@ -584,6 +591,21 @@
|
|||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="">
|
||||||
|
<div class=" space-y-3 overflow-y-scroll scrollbar-hidden h-full">
|
||||||
|
|
||||||
|
<div class="text-sm font-medium mb-1">{$i18n.t('Google Drive')}</div>
|
||||||
|
|
||||||
|
<div class=" flex gap-1.5">
|
||||||
|
<div class="my-2">
|
||||||
|
<div class="flex justify-between items-center text-xs">{$i18n.t('Enable Google Drive')}</div>
|
||||||
|
<div class="flex justify-between items-center text-xs">
|
||||||
|
<Switch bind:state={enableGoogleDrive} />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<hr class=" dark:border-gray-850" />
|
<hr class=" dark:border-gray-850" />
|
||||||
|
|
||||||
<div class=" ">
|
<div class=" ">
|
||||||
|
Loading…
Reference in New Issue
Block a user