|
152 | 152 | return;
|
153 | 153 | }
|
154 | 154 | if (
|
155 |
| - RAGConfig.CONTENT_EXTRACTION_ENGINE === 'docling' && |
156 |
| - RAGConfig.DOCLING_DO_OCR && |
| 155 | + RAGConfig.CONTENT_EXTRACTION_ENGINE === 'docling' && |
| 156 | + RAGConfig.DOCLING_DO_OCR && |
157 | 157 | ((RAGConfig.DOCLING_OCR_ENGINE === '' && RAGConfig.DOCLING_OCR_LANG !== '') ||
|
158 | 158 | (RAGConfig.DOCLING_OCR_ENGINE !== '' && RAGConfig.DOCLING_OCR_LANG === ''))
|
159 | 159 | ) {
|
|
164 | 164 | }
|
165 | 165 | if (
|
166 | 166 | RAGConfig.CONTENT_EXTRACTION_ENGINE === 'docling' &&
|
167 |
| - RAGConfig.DOCLING_DO_OCR === false && |
168 |
| - RAGConfig.DOCLING_FORCE_OCR === true |
| 167 | + RAGConfig.DOCLING_DO_OCR === false && |
| 168 | + RAGConfig.DOCLING_FORCE_OCR === true |
169 | 169 | ) {
|
170 |
| - toast.error( |
171 |
| - $i18n.t('In order to force OCR, performing OCR must be enabled.') |
172 |
| - ); |
| 170 | + toast.error($i18n.t('In order to force OCR, performing OCR must be enabled.')); |
173 | 171 | return;
|
174 | 172 | }
|
175 | 173 |
|
|
555 | 553 | placeholder={$i18n.t('Enter Docling Server URL')}
|
556 | 554 | bind:value={RAGConfig.DOCLING_SERVER_URL}
|
557 | 555 | />
|
558 |
| - </div> |
| 556 | + </div> |
559 | 557 |
|
560 | 558 | <div class="flex w-full mt-2">
|
561 | 559 | <div class="flex-1 flex justify-between">
|
|
568 | 566 | </div>
|
569 | 567 | </div>
|
570 | 568 | {#if RAGConfig.DOCLING_DO_OCR}
|
571 |
| - <div class="flex w-full mt-2"> |
572 |
| - <input |
573 |
| - class="flex-1 w-full text-sm bg-transparent outline-hidden" |
574 |
| - placeholder={$i18n.t('Enter Docling OCR Engine')} |
575 |
| - bind:value={RAGConfig.DOCLING_OCR_ENGINE} |
576 |
| - /> |
577 |
| - <input |
578 |
| - class="flex-1 w-full text-sm bg-transparent outline-hidden" |
579 |
| - placeholder={$i18n.t('Enter Docling OCR Language(s)')} |
580 |
| - bind:value={RAGConfig.DOCLING_OCR_LANG} |
581 |
| - /> |
582 |
| - </div> |
583 |
| - {/if} |
| 569 | + <div class="flex w-full mt-2"> |
| 570 | + <input |
| 571 | + class="flex-1 w-full text-sm bg-transparent outline-hidden" |
| 572 | + placeholder={$i18n.t('Enter Docling OCR Engine')} |
| 573 | + bind:value={RAGConfig.DOCLING_OCR_ENGINE} |
| 574 | + /> |
| 575 | + <input |
| 576 | + class="flex-1 w-full text-sm bg-transparent outline-hidden" |
| 577 | + placeholder={$i18n.t('Enter Docling OCR Language(s)')} |
| 578 | + bind:value={RAGConfig.DOCLING_OCR_LANG} |
| 579 | + /> |
| 580 | + </div> |
| 581 | + {/if} |
584 | 582 | <div class="flex w-full mt-2">
|
585 | 583 | <div class="flex-1 flex justify-between">
|
586 | 584 | <div class=" self-center text-xs font-medium">
|
|
591 | 589 | </div>
|
592 | 590 | </div>
|
593 | 591 | </div>
|
594 |
| - <div class="flex justify-between w-full mt-2"> |
595 |
| - <div class="self-center text-xs font-medium"> |
596 |
| - <Tooltip content={''} placement="top-start"> |
597 |
| - {$i18n.t('PDF Backend')} |
598 |
| - </Tooltip> |
599 |
| - </div> |
600 |
| - <div class=""> |
601 |
| - <select |
602 |
| - class="dark:bg-gray-900 w-fit pr-8 rounded-sm px-2 text-xs bg-transparent outline-hidden text-right" |
603 |
| - bind:value={RAGConfig.DOCLING_PDF_BACKEND} |
604 |
| - > |
605 |
| - <option value="pypdfium2">{$i18n.t('pypdfium2')}</option> |
606 |
| - <option value="dlparse_v1">{$i18n.t('dlparse_v1')}</option> |
607 |
| - <option value="dlparse_v2">{$i18n.t('dlparse_v2')}</option> |
608 |
| - <option value="dlparse_v4">{$i18n.t('dlparse_v4')}</option> |
609 |
| - </select> |
610 |
| - </div> |
611 |
| - </div> |
612 |
| - <div class="flex justify-between w-full mt-2"> |
613 |
| - <div class="self-center text-xs font-medium"> |
614 |
| - <Tooltip content={''} placement="top-start"> |
615 |
| - {$i18n.t('Table Mode')} |
616 |
| - </Tooltip> |
617 |
| - </div> |
618 |
| - <div class=""> |
619 |
| - <select |
620 |
| - class="dark:bg-gray-900 w-fit pr-8 rounded-sm px-2 text-xs bg-transparent outline-hidden text-right" |
621 |
| - bind:value={RAGConfig.DOCLING_TABLE_MODE} |
622 |
| - > |
623 |
| - <option value="fast">{$i18n.t('fast')}</option> |
624 |
| - <option value="accurate">{$i18n.t('accurate')}</option> |
625 |
| - </select> |
626 |
| - </div> |
627 |
| - </div> |
628 |
| - <div class="flex justify-between w-full mt-2"> |
629 |
| - <div class="self-center text-xs font-medium"> |
630 |
| - <Tooltip content={''} placement="top-start"> |
631 |
| - {$i18n.t('Pipeline')} |
632 |
| - </Tooltip> |
633 |
| - </div> |
634 |
| - <div class=""> |
635 |
| - <select |
636 |
| - class="dark:bg-gray-900 w-fit pr-8 rounded-sm px-2 text-xs bg-transparent outline-hidden text-right" |
637 |
| - bind:value={RAGConfig.DOCLING_PIPELINE} |
638 |
| - > |
639 |
| - <option value="standard">{$i18n.t('standard')}</option> |
640 |
| - <option value="vlm">{$i18n.t('vlm')}</option> |
641 |
| - </select> |
642 |
| - </div> |
643 |
| - </div> |
644 |
| - <div class="flex w-full mt-2"> |
| 592 | + <div class="flex justify-between w-full mt-2"> |
| 593 | + <div class="self-center text-xs font-medium"> |
| 594 | + <Tooltip content={''} placement="top-start"> |
| 595 | + {$i18n.t('PDF Backend')} |
| 596 | + </Tooltip> |
| 597 | + </div> |
| 598 | + <div class=""> |
| 599 | + <select |
| 600 | + class="dark:bg-gray-900 w-fit pr-8 rounded-sm px-2 text-xs bg-transparent outline-hidden text-right" |
| 601 | + bind:value={RAGConfig.DOCLING_PDF_BACKEND} |
| 602 | + > |
| 603 | + <option value="pypdfium2">{$i18n.t('pypdfium2')}</option> |
| 604 | + <option value="dlparse_v1">{$i18n.t('dlparse_v1')}</option> |
| 605 | + <option value="dlparse_v2">{$i18n.t('dlparse_v2')}</option> |
| 606 | + <option value="dlparse_v4">{$i18n.t('dlparse_v4')}</option> |
| 607 | + </select> |
| 608 | + </div> |
| 609 | + </div> |
| 610 | + <div class="flex justify-between w-full mt-2"> |
| 611 | + <div class="self-center text-xs font-medium"> |
| 612 | + <Tooltip content={''} placement="top-start"> |
| 613 | + {$i18n.t('Table Mode')} |
| 614 | + </Tooltip> |
| 615 | + </div> |
| 616 | + <div class=""> |
| 617 | + <select |
| 618 | + class="dark:bg-gray-900 w-fit pr-8 rounded-sm px-2 text-xs bg-transparent outline-hidden text-right" |
| 619 | + bind:value={RAGConfig.DOCLING_TABLE_MODE} |
| 620 | + > |
| 621 | + <option value="fast">{$i18n.t('fast')}</option> |
| 622 | + <option value="accurate">{$i18n.t('accurate')}</option> |
| 623 | + </select> |
| 624 | + </div> |
| 625 | + </div> |
| 626 | + <div class="flex justify-between w-full mt-2"> |
| 627 | + <div class="self-center text-xs font-medium"> |
| 628 | + <Tooltip content={''} placement="top-start"> |
| 629 | + {$i18n.t('Pipeline')} |
| 630 | + </Tooltip> |
| 631 | + </div> |
| 632 | + <div class=""> |
| 633 | + <select |
| 634 | + class="dark:bg-gray-900 w-fit pr-8 rounded-sm px-2 text-xs bg-transparent outline-hidden text-right" |
| 635 | + bind:value={RAGConfig.DOCLING_PIPELINE} |
| 636 | + > |
| 637 | + <option value="standard">{$i18n.t('standard')}</option> |
| 638 | + <option value="vlm">{$i18n.t('vlm')}</option> |
| 639 | + </select> |
| 640 | + </div> |
| 641 | + </div> |
| 642 | + <div class="flex w-full mt-2"> |
645 | 643 | <div class="flex-1 flex justify-between">
|
646 | 644 | <div class=" self-center text-xs font-medium">
|
647 | 645 | {$i18n.t('Describe Pictures in Documents')}
|
|
0 commit comments