|
318 | 318 |
|
319 | 319 | <hr class=" border-gray-100 dark:border-gray-850 my-2" /> |
320 | 320 |
|
| 321 | + <div class=" mb-2.5 flex flex-col w-full justify-between"> |
| 322 | + <div class="flex w-full justify-between"> |
| 323 | + <div class=" self-center text-xs font-medium"> |
| 324 | + {$i18n.t('Content Extraction Engine')} |
| 325 | + </div> |
| 326 | + |
| 327 | + <div class=""> |
| 328 | + <select |
| 329 | + class="dark:bg-gray-900 w-fit pr-8 rounded-sm px-2 text-xs bg-transparent outline-hidden text-right" |
| 330 | + bind:value={contentExtractionEngine} |
| 331 | + on:change={(e) => { |
| 332 | + showDocumentIntelligenceConfig = e.target.value === 'document_intelligence'; |
| 333 | + }} |
| 334 | + > |
| 335 | + <option value="">{$i18n.t('Default')} </option> |
| 336 | + <option value="tika">{$i18n.t('Tika')}</option> |
| 337 | + <option value="document_intelligence">{$i18n.t('Document Intelligence')}</option> |
| 338 | + </select> |
| 339 | + </div> |
| 340 | + </div> |
| 341 | + {#if contentExtractionEngine === 'tika'} |
| 342 | + <div class="flex w-full mt-1"> |
| 343 | + <div class="flex-1 mr-2"> |
| 344 | + <input |
| 345 | + class="flex-1 w-full rounded-lg text-sm bg-transparent outline-hidden" |
| 346 | + placeholder={$i18n.t('Enter Tika Server URL')} |
| 347 | + bind:value={tikaServerUrl} |
| 348 | + /> |
| 349 | + </div> |
| 350 | + </div> |
| 351 | + {:else if contentExtractionEngine === 'document_intelligence'} |
| 352 | + <div class="my-0.5 flex gap-2 pr-2"> |
| 353 | + <input |
| 354 | + class="flex-1 w-full rounded-lg text-sm bg-transparent outline-hidden" |
| 355 | + placeholder={$i18n.t('Enter Document Intelligence Endpoint')} |
| 356 | + bind:value={documentIntelligenceEndpoint} |
| 357 | + /> |
| 358 | + |
| 359 | + <SensitiveInput |
| 360 | + placeholder={$i18n.t('Enter Document Intelligence Key')} |
| 361 | + bind:value={documentIntelligenceKey} |
| 362 | + /> |
| 363 | + </div> |
| 364 | + {/if} |
| 365 | + </div> |
| 366 | + |
| 367 | + {#if contentExtractionEngine === ''} |
| 368 | + <div class=" mb-2.5 flex w-full justify-between"> |
| 369 | + <div class=" self-center text-xs font-medium"> |
| 370 | + {$i18n.t('PDF Extract Images (OCR)')} |
| 371 | + </div> |
| 372 | + <div class="flex items-center relative"> |
| 373 | + <Switch bind:state={pdfExtractImages} /> |
| 374 | + </div> |
| 375 | + </div> |
| 376 | + {/if} |
| 377 | + |
| 378 | + <div class=" mb-2.5 flex w-full justify-between"> |
| 379 | + <div class=" self-center text-xs font-medium">{$i18n.t('Text Splitter')}</div> |
| 380 | + <div class="flex items-center relative"> |
| 381 | + <select |
| 382 | + class="dark:bg-gray-900 w-fit pr-8 rounded-sm px-2 text-xs bg-transparent outline-hidden text-right" |
| 383 | + bind:value={textSplitter} |
| 384 | + > |
| 385 | + <option value="">{$i18n.t('Default')} ({$i18n.t('Character')})</option> |
| 386 | + <option value="token">{$i18n.t('Token')} ({$i18n.t('Tiktoken')})</option> |
| 387 | + </select> |
| 388 | + </div> |
| 389 | + </div> |
| 390 | + |
| 391 | + <div class=" mb-2.5 flex w-full justify-between"> |
| 392 | + <div class=" flex gap-1.5 w-full"> |
| 393 | + <div class=" w-full justify-between"> |
| 394 | + <div class="self-center text-xs font-medium min-w-fit mb-1"> |
| 395 | + {$i18n.t('Chunk Size')} |
| 396 | + </div> |
| 397 | + <div class="self-center"> |
| 398 | + <input |
| 399 | + class=" w-full rounded-lg py-1.5 px-4 text-sm bg-gray-50 dark:text-gray-300 dark:bg-gray-850 outline-hidden" |
| 400 | + type="number" |
| 401 | + placeholder={$i18n.t('Enter Chunk Size')} |
| 402 | + bind:value={chunkSize} |
| 403 | + autocomplete="off" |
| 404 | + min="0" |
| 405 | + /> |
| 406 | + </div> |
| 407 | + </div> |
| 408 | + |
| 409 | + <div class="w-full"> |
| 410 | + <div class=" self-center text-xs font-medium min-w-fit mb-1"> |
| 411 | + {$i18n.t('Chunk Overlap')} |
| 412 | + </div> |
| 413 | + |
| 414 | + <div class="self-center"> |
| 415 | + <input |
| 416 | + class="w-full rounded-lg py-1.5 px-4 text-sm bg-gray-50 dark:text-gray-300 dark:bg-gray-850 outline-hidden" |
| 417 | + type="number" |
| 418 | + placeholder={$i18n.t('Enter Chunk Overlap')} |
| 419 | + bind:value={chunkOverlap} |
| 420 | + autocomplete="off" |
| 421 | + min="0" |
| 422 | + /> |
| 423 | + </div> |
| 424 | + </div> |
| 425 | + </div> |
| 426 | + </div> |
| 427 | + </div> |
| 428 | + |
| 429 | + <div class="mb-3"> |
| 430 | + <div class=" mb-2.5 text-base font-medium">{$i18n.t('Embedding')}</div> |
| 431 | + |
| 432 | + <hr class=" border-gray-100 dark:border-gray-850 my-2" /> |
| 433 | + |
321 | 434 | <div class=" mb-2.5 flex flex-col w-full justify-between"> |
322 | 435 | <div class="flex w-full justify-between"> |
323 | 436 | <div class=" self-center text-xs font-medium">{$i18n.t('Embedding Model Engine')}</div> |
|
644 | 757 | </div> |
645 | 758 | </div> |
646 | 759 |
|
647 | | - <div class="mb-3"> |
648 | | - <div class=" mb-2.5 text-base font-medium">{$i18n.t('Content')}</div> |
649 | | - |
650 | | - <hr class=" border-gray-100 dark:border-gray-850 my-2" /> |
651 | | - |
652 | | - <div class=" mb-2.5 flex flex-col w-full justify-between"> |
653 | | - <div class="flex w-full justify-between"> |
654 | | - <div class=" self-center text-xs font-medium"> |
655 | | - {$i18n.t('Content Extraction Engine')} |
656 | | - </div> |
657 | | - |
658 | | - <div class=""> |
659 | | - <select |
660 | | - class="dark:bg-gray-900 w-fit pr-8 rounded-sm px-2 text-xs bg-transparent outline-hidden text-right" |
661 | | - bind:value={contentExtractionEngine} |
662 | | - on:change={(e) => { |
663 | | - showDocumentIntelligenceConfig = e.target.value === 'document_intelligence'; |
664 | | - }} |
665 | | - > |
666 | | - <option value="">{$i18n.t('Default')} </option> |
667 | | - <option value="tika">{$i18n.t('Tika')}</option> |
668 | | - <option value="document_intelligence">{$i18n.t('Document Intelligence')}</option> |
669 | | - </select> |
670 | | - </div> |
671 | | - </div> |
672 | | - {#if contentExtractionEngine === ''} |
673 | | - <div class="flex w-full mt-1"> |
674 | | - <div class="flex w-full justify-between items-center text-xs"> |
675 | | - <div class=" text-xs font-medium">{$i18n.t('PDF Extract Images (OCR)')}</div> |
676 | | - |
677 | | - <div> |
678 | | - <Switch bind:state={pdfExtractImages} /> |
679 | | - </div> |
680 | | - </div> |
681 | | - </div> |
682 | | - {:else if contentExtractionEngine === 'tika'} |
683 | | - <div class="flex w-full mt-1"> |
684 | | - <div class="flex-1 mr-2"> |
685 | | - <input |
686 | | - class="flex-1 w-full rounded-lg text-sm bg-transparent outline-hidden" |
687 | | - placeholder={$i18n.t('Enter Tika Server URL')} |
688 | | - bind:value={tikaServerUrl} |
689 | | - /> |
690 | | - </div> |
691 | | - </div> |
692 | | - {:else if contentExtractionEngine === 'document_intelligence'} |
693 | | - <div class="my-0.5 flex gap-2 pr-2"> |
694 | | - <input |
695 | | - class="flex-1 w-full rounded-lg text-sm bg-transparent outline-hidden" |
696 | | - placeholder={$i18n.t('Enter Document Intelligence Endpoint')} |
697 | | - bind:value={documentIntelligenceEndpoint} |
698 | | - /> |
699 | | - |
700 | | - <SensitiveInput |
701 | | - placeholder={$i18n.t('Enter Document Intelligence Key')} |
702 | | - bind:value={documentIntelligenceKey} |
703 | | - /> |
704 | | - </div> |
705 | | - {/if} |
706 | | - </div> |
707 | | - |
708 | | - <div class=" mb-2.5 flex w-full justify-between"> |
709 | | - <div class=" self-center text-xs font-medium">{$i18n.t('Text Splitter')}</div> |
710 | | - <div class="flex items-center relative"> |
711 | | - <select |
712 | | - class="dark:bg-gray-900 w-fit pr-8 rounded-sm px-2 text-xs bg-transparent outline-hidden text-right" |
713 | | - bind:value={textSplitter} |
714 | | - > |
715 | | - <option value="">{$i18n.t('Default')} ({$i18n.t('Character')})</option> |
716 | | - <option value="token">{$i18n.t('Token')} ({$i18n.t('Tiktoken')})</option> |
717 | | - </select> |
718 | | - </div> |
719 | | - </div> |
720 | | - |
721 | | - <div class=" flex gap-1.5"> |
722 | | - <div class=" w-full justify-between"> |
723 | | - <div class="self-center text-xs font-medium min-w-fit mb-1"> |
724 | | - {$i18n.t('Chunk Size')} |
725 | | - </div> |
726 | | - <div class="self-center"> |
727 | | - <input |
728 | | - class=" w-full rounded-lg py-1.5 px-4 text-sm bg-gray-50 dark:text-gray-300 dark:bg-gray-850 outline-hidden" |
729 | | - type="number" |
730 | | - placeholder={$i18n.t('Enter Chunk Size')} |
731 | | - bind:value={chunkSize} |
732 | | - autocomplete="off" |
733 | | - min="0" |
734 | | - /> |
735 | | - </div> |
736 | | - </div> |
737 | | - |
738 | | - <div class="w-full"> |
739 | | - <div class=" self-center text-xs font-medium min-w-fit mb-1"> |
740 | | - {$i18n.t('Chunk Overlap')} |
741 | | - </div> |
742 | | - |
743 | | - <div class="self-center"> |
744 | | - <input |
745 | | - class="w-full rounded-lg py-1.5 px-4 text-sm bg-gray-50 dark:text-gray-300 dark:bg-gray-850 outline-hidden" |
746 | | - type="number" |
747 | | - placeholder={$i18n.t('Enter Chunk Overlap')} |
748 | | - bind:value={chunkOverlap} |
749 | | - autocomplete="off" |
750 | | - min="0" |
751 | | - /> |
752 | | - </div> |
753 | | - </div> |
754 | | - </div> |
755 | | - </div> |
756 | | - |
757 | 760 | <div class="mb-3"> |
758 | 761 | <div class=" mb-2.5 text-base font-medium">{$i18n.t('Files')}</div> |
759 | 762 |
|
|
0 commit comments