|
@@ -152,8 +152,8 @@
|
|
|
return;
|
|
|
}
|
|
|
if (
|
|
|
- RAGConfig.CONTENT_EXTRACTION_ENGINE === 'docling' &&
|
|
|
- RAGConfig.DOCLING_DO_OCR &&
|
|
|
+ RAGConfig.CONTENT_EXTRACTION_ENGINE === 'docling' &&
|
|
|
+ RAGConfig.DOCLING_DO_OCR &&
|
|
|
((RAGConfig.DOCLING_OCR_ENGINE === '' && RAGConfig.DOCLING_OCR_LANG !== '') ||
|
|
|
(RAGConfig.DOCLING_OCR_ENGINE !== '' && RAGConfig.DOCLING_OCR_LANG === ''))
|
|
|
) {
|
|
@@ -164,12 +164,10 @@
|
|
|
}
|
|
|
if (
|
|
|
RAGConfig.CONTENT_EXTRACTION_ENGINE === 'docling' &&
|
|
|
- RAGConfig.DOCLING_DO_OCR === false &&
|
|
|
- RAGConfig.DOCLING_FORCE_OCR === true
|
|
|
+ RAGConfig.DOCLING_DO_OCR === false &&
|
|
|
+ RAGConfig.DOCLING_FORCE_OCR === true
|
|
|
) {
|
|
|
- toast.error(
|
|
|
- $i18n.t('In order to force OCR, performing OCR must be enabled.')
|
|
|
- );
|
|
|
+ toast.error($i18n.t('In order to force OCR, performing OCR must be enabled.'));
|
|
|
return;
|
|
|
}
|
|
|
|
|
@@ -555,7 +553,7 @@
|
|
|
placeholder={$i18n.t('Enter Docling Server URL')}
|
|
|
bind:value={RAGConfig.DOCLING_SERVER_URL}
|
|
|
/>
|
|
|
- </div>
|
|
|
+ </div>
|
|
|
|
|
|
<div class="flex w-full mt-2">
|
|
|
<div class="flex-1 flex justify-between">
|
|
@@ -568,19 +566,19 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
{#if RAGConfig.DOCLING_DO_OCR}
|
|
|
- <div class="flex w-full mt-2">
|
|
|
- <input
|
|
|
- class="flex-1 w-full text-sm bg-transparent outline-hidden"
|
|
|
- placeholder={$i18n.t('Enter Docling OCR Engine')}
|
|
|
- bind:value={RAGConfig.DOCLING_OCR_ENGINE}
|
|
|
- />
|
|
|
- <input
|
|
|
- class="flex-1 w-full text-sm bg-transparent outline-hidden"
|
|
|
- placeholder={$i18n.t('Enter Docling OCR Language(s)')}
|
|
|
- bind:value={RAGConfig.DOCLING_OCR_LANG}
|
|
|
- />
|
|
|
- </div>
|
|
|
- {/if}
|
|
|
+ <div class="flex w-full mt-2">
|
|
|
+ <input
|
|
|
+ class="flex-1 w-full text-sm bg-transparent outline-hidden"
|
|
|
+ placeholder={$i18n.t('Enter Docling OCR Engine')}
|
|
|
+ bind:value={RAGConfig.DOCLING_OCR_ENGINE}
|
|
|
+ />
|
|
|
+ <input
|
|
|
+ class="flex-1 w-full text-sm bg-transparent outline-hidden"
|
|
|
+ placeholder={$i18n.t('Enter Docling OCR Language(s)')}
|
|
|
+ bind:value={RAGConfig.DOCLING_OCR_LANG}
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ {/if}
|
|
|
<div class="flex w-full mt-2">
|
|
|
<div class="flex-1 flex justify-between">
|
|
|
<div class=" self-center text-xs font-medium">
|
|
@@ -591,57 +589,57 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="flex justify-between w-full mt-2">
|
|
|
- <div class="self-center text-xs font-medium">
|
|
|
- <Tooltip content={''} placement="top-start">
|
|
|
- {$i18n.t('PDF Backend')}
|
|
|
- </Tooltip>
|
|
|
- </div>
|
|
|
- <div class="">
|
|
|
- <select
|
|
|
- class="dark:bg-gray-900 w-fit pr-8 rounded-sm px-2 text-xs bg-transparent outline-hidden text-right"
|
|
|
- bind:value={RAGConfig.DOCLING_PDF_BACKEND}
|
|
|
- >
|
|
|
- <option value="pypdfium2">{$i18n.t('pypdfium2')}</option>
|
|
|
- <option value="dlparse_v1">{$i18n.t('dlparse_v1')}</option>
|
|
|
- <option value="dlparse_v2">{$i18n.t('dlparse_v2')}</option>
|
|
|
- <option value="dlparse_v4">{$i18n.t('dlparse_v4')}</option>
|
|
|
- </select>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="flex justify-between w-full mt-2">
|
|
|
- <div class="self-center text-xs font-medium">
|
|
|
- <Tooltip content={''} placement="top-start">
|
|
|
- {$i18n.t('Table Mode')}
|
|
|
- </Tooltip>
|
|
|
- </div>
|
|
|
- <div class="">
|
|
|
- <select
|
|
|
- class="dark:bg-gray-900 w-fit pr-8 rounded-sm px-2 text-xs bg-transparent outline-hidden text-right"
|
|
|
- bind:value={RAGConfig.DOCLING_TABLE_MODE}
|
|
|
- >
|
|
|
- <option value="fast">{$i18n.t('fast')}</option>
|
|
|
- <option value="accurate">{$i18n.t('accurate')}</option>
|
|
|
- </select>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="flex justify-between w-full mt-2">
|
|
|
- <div class="self-center text-xs font-medium">
|
|
|
- <Tooltip content={''} placement="top-start">
|
|
|
- {$i18n.t('Pipeline')}
|
|
|
- </Tooltip>
|
|
|
- </div>
|
|
|
- <div class="">
|
|
|
- <select
|
|
|
- class="dark:bg-gray-900 w-fit pr-8 rounded-sm px-2 text-xs bg-transparent outline-hidden text-right"
|
|
|
- bind:value={RAGConfig.DOCLING_PIPELINE}
|
|
|
- >
|
|
|
- <option value="standard">{$i18n.t('standard')}</option>
|
|
|
- <option value="vlm">{$i18n.t('vlm')}</option>
|
|
|
- </select>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="flex w-full mt-2">
|
|
|
+ <div class="flex justify-between w-full mt-2">
|
|
|
+ <div class="self-center text-xs font-medium">
|
|
|
+ <Tooltip content={''} placement="top-start">
|
|
|
+ {$i18n.t('PDF Backend')}
|
|
|
+ </Tooltip>
|
|
|
+ </div>
|
|
|
+ <div class="">
|
|
|
+ <select
|
|
|
+ class="dark:bg-gray-900 w-fit pr-8 rounded-sm px-2 text-xs bg-transparent outline-hidden text-right"
|
|
|
+ bind:value={RAGConfig.DOCLING_PDF_BACKEND}
|
|
|
+ >
|
|
|
+ <option value="pypdfium2">{$i18n.t('pypdfium2')}</option>
|
|
|
+ <option value="dlparse_v1">{$i18n.t('dlparse_v1')}</option>
|
|
|
+ <option value="dlparse_v2">{$i18n.t('dlparse_v2')}</option>
|
|
|
+ <option value="dlparse_v4">{$i18n.t('dlparse_v4')}</option>
|
|
|
+ </select>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="flex justify-between w-full mt-2">
|
|
|
+ <div class="self-center text-xs font-medium">
|
|
|
+ <Tooltip content={''} placement="top-start">
|
|
|
+ {$i18n.t('Table Mode')}
|
|
|
+ </Tooltip>
|
|
|
+ </div>
|
|
|
+ <div class="">
|
|
|
+ <select
|
|
|
+ class="dark:bg-gray-900 w-fit pr-8 rounded-sm px-2 text-xs bg-transparent outline-hidden text-right"
|
|
|
+ bind:value={RAGConfig.DOCLING_TABLE_MODE}
|
|
|
+ >
|
|
|
+ <option value="fast">{$i18n.t('fast')}</option>
|
|
|
+ <option value="accurate">{$i18n.t('accurate')}</option>
|
|
|
+ </select>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="flex justify-between w-full mt-2">
|
|
|
+ <div class="self-center text-xs font-medium">
|
|
|
+ <Tooltip content={''} placement="top-start">
|
|
|
+ {$i18n.t('Pipeline')}
|
|
|
+ </Tooltip>
|
|
|
+ </div>
|
|
|
+ <div class="">
|
|
|
+ <select
|
|
|
+ class="dark:bg-gray-900 w-fit pr-8 rounded-sm px-2 text-xs bg-transparent outline-hidden text-right"
|
|
|
+ bind:value={RAGConfig.DOCLING_PIPELINE}
|
|
|
+ >
|
|
|
+ <option value="standard">{$i18n.t('standard')}</option>
|
|
|
+ <option value="vlm">{$i18n.t('vlm')}</option>
|
|
|
+ </select>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="flex w-full mt-2">
|
|
|
<div class="flex-1 flex justify-between">
|
|
|
<div class=" self-center text-xs font-medium">
|
|
|
{$i18n.t('Describe Pictures in Documents')}
|