|
@@ -246,7 +246,7 @@
|
|
|
<hr class=" border-gray-100 dark:border-gray-850 my-2" />
|
|
|
|
|
|
<div class="mb-2.5 flex flex-col w-full justify-between">
|
|
|
- <div class="flex w-full justify-between">
|
|
|
+ <div class="flex w-full justify-between mb-1">
|
|
|
<div class="self-center text-xs font-medium">
|
|
|
{$i18n.t('Content Extraction Engine')}
|
|
|
</div>
|
|
@@ -279,7 +279,7 @@
|
|
|
<div class="flex w-full mt-1">
|
|
|
<div class="flex-1 mr-2">
|
|
|
<input
|
|
|
- class="flex-1 w-full rounded-lg text-sm bg-transparent outline-hidden"
|
|
|
+ class="flex-1 w-full text-sm bg-transparent outline-hidden"
|
|
|
placeholder={$i18n.t('Enter Tika Server URL')}
|
|
|
bind:value={RAGConfig.TIKA_SERVER_URL}
|
|
|
/>
|
|
@@ -288,27 +288,38 @@
|
|
|
{:else if RAGConfig.CONTENT_EXTRACTION_ENGINE === 'docling'}
|
|
|
<div class="flex w-full mt-1">
|
|
|
<input
|
|
|
- class="flex-1 w-full rounded-lg text-sm bg-transparent outline-hidden"
|
|
|
+ class="flex-1 w-full text-sm bg-transparent outline-hidden"
|
|
|
placeholder={$i18n.t('Enter Docling Server URL')}
|
|
|
bind:value={RAGConfig.DOCLING_SERVER_URL}
|
|
|
/>
|
|
|
</div>
|
|
|
<div class="flex w-full mt-2">
|
|
|
<input
|
|
|
- class="flex-1 w-full rounded-lg text-sm bg-transparent outline-hidden"
|
|
|
+ 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 rounded-lg text-sm bg-transparent outline-hidden"
|
|
|
+ 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>
|
|
|
+
|
|
|
+ <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')}
|
|
|
+ </div>
|
|
|
+ <div class="flex items-center relative">
|
|
|
+ <Switch bind:state={RAGConfig.DOCLING_DO_PICTURE_DESCRIPTION} />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
{:else if RAGConfig.CONTENT_EXTRACTION_ENGINE === 'document_intelligence'}
|
|
|
<div class="my-0.5 flex gap-2 pr-2">
|
|
|
<input
|
|
|
- class="flex-1 w-full rounded-lg text-sm bg-transparent outline-hidden"
|
|
|
+ class="flex-1 w-full text-sm bg-transparent outline-hidden"
|
|
|
placeholder={$i18n.t('Enter Document Intelligence Endpoint')}
|
|
|
bind:value={RAGConfig.DOCUMENT_INTELLIGENCE_ENDPOINT}
|
|
|
/>
|
|
@@ -437,7 +448,7 @@
|
|
|
{#if embeddingEngine === 'openai'}
|
|
|
<div class="my-0.5 flex gap-2 pr-2">
|
|
|
<input
|
|
|
- class="flex-1 w-full rounded-lg text-sm bg-transparent outline-hidden"
|
|
|
+ class="flex-1 w-full text-sm bg-transparent outline-hidden"
|
|
|
placeholder={$i18n.t('API Base URL')}
|
|
|
bind:value={OpenAIUrl}
|
|
|
required
|
|
@@ -448,7 +459,7 @@
|
|
|
{:else if embeddingEngine === 'ollama'}
|
|
|
<div class="my-0.5 flex gap-2 pr-2">
|
|
|
<input
|
|
|
- class="flex-1 w-full rounded-lg text-sm bg-transparent outline-hidden"
|
|
|
+ class="flex-1 w-full text-sm bg-transparent outline-hidden"
|
|
|
placeholder={$i18n.t('API Base URL')}
|
|
|
bind:value={OllamaUrl}
|
|
|
required
|
|
@@ -471,7 +482,7 @@
|
|
|
<div class="flex w-full">
|
|
|
<div class="flex-1 mr-2">
|
|
|
<input
|
|
|
- class="flex-1 w-full rounded-lg text-sm bg-transparent outline-hidden"
|
|
|
+ class="flex-1 w-full text-sm bg-transparent outline-hidden"
|
|
|
bind:value={embeddingModel}
|
|
|
placeholder={$i18n.t('Set embedding model')}
|
|
|
required
|
|
@@ -482,7 +493,7 @@
|
|
|
<div class="flex w-full">
|
|
|
<div class="flex-1 mr-2">
|
|
|
<input
|
|
|
- class="flex-1 w-full rounded-lg text-sm bg-transparent outline-hidden"
|
|
|
+ class="flex-1 w-full text-sm bg-transparent outline-hidden"
|
|
|
placeholder={$i18n.t('Set embedding model (e.g. {{model}})', {
|
|
|
model: embeddingModel.slice(-40)
|
|
|
})}
|
|
@@ -639,7 +650,7 @@
|
|
|
{#if RAGConfig.RAG_RERANKING_ENGINE === 'external'}
|
|
|
<div class="my-0.5 flex gap-2 pr-2">
|
|
|
<input
|
|
|
- class="flex-1 w-full rounded-lg text-sm bg-transparent outline-hidden"
|
|
|
+ class="flex-1 w-full text-sm bg-transparent outline-hidden"
|
|
|
placeholder={$i18n.t('API Base URL')}
|
|
|
bind:value={RAGConfig.RAG_EXTERNAL_RERANKER_URL}
|
|
|
required
|
|
@@ -661,7 +672,7 @@
|
|
|
<div class="flex w-full">
|
|
|
<div class="flex-1 mr-2">
|
|
|
<input
|
|
|
- class="flex-1 w-full rounded-lg text-sm bg-transparent outline-hidden"
|
|
|
+ class="flex-1 w-full text-sm bg-transparent outline-hidden"
|
|
|
placeholder={$i18n.t('Set reranking model (e.g. {{model}})', {
|
|
|
model: 'BAAI/bge-reranker-v2-m3'
|
|
|
})}
|
|
@@ -677,7 +688,7 @@
|
|
|
<div class=" self-center text-xs font-medium">{$i18n.t('Top K')}</div>
|
|
|
<div class="flex items-center relative">
|
|
|
<input
|
|
|
- class="flex-1 w-full rounded-lg text-sm bg-transparent outline-hidden"
|
|
|
+ class="flex-1 w-full text-sm bg-transparent outline-hidden"
|
|
|
type="number"
|
|
|
placeholder={$i18n.t('Enter Top K')}
|
|
|
bind:value={RAGConfig.TOP_K}
|
|
@@ -692,7 +703,7 @@
|
|
|
<div class="self-center text-xs font-medium">{$i18n.t('Top K Reranker')}</div>
|
|
|
<div class="flex items-center relative">
|
|
|
<input
|
|
|
- class="flex-1 w-full rounded-lg text-sm bg-transparent outline-hidden"
|
|
|
+ class="flex-1 w-full text-sm bg-transparent outline-hidden"
|
|
|
type="number"
|
|
|
placeholder={$i18n.t('Enter Top K Reranker')}
|
|
|
bind:value={RAGConfig.TOP_K_RERANKER}
|
|
@@ -711,7 +722,7 @@
|
|
|
</div>
|
|
|
<div class="flex items-center relative">
|
|
|
<input
|
|
|
- class="flex-1 w-full rounded-lg text-sm bg-transparent outline-hidden"
|
|
|
+ class="flex-1 w-full text-sm bg-transparent outline-hidden"
|
|
|
type="number"
|
|
|
step="0.01"
|
|
|
placeholder={$i18n.t('Enter Score')}
|
|
@@ -770,7 +781,7 @@
|
|
|
placement="top-start"
|
|
|
>
|
|
|
<input
|
|
|
- class="flex-1 w-full rounded-lg text-sm bg-transparent outline-hidden"
|
|
|
+ class="flex-1 w-full text-sm bg-transparent outline-hidden"
|
|
|
type="number"
|
|
|
placeholder={$i18n.t('Leave empty for unlimited')}
|
|
|
bind:value={RAGConfig.FILE_MAX_SIZE}
|
|
@@ -791,7 +802,7 @@
|
|
|
placement="top-start"
|
|
|
>
|
|
|
<input
|
|
|
- class="flex-1 w-full rounded-lg text-sm bg-transparent outline-hidden"
|
|
|
+ class="flex-1 w-full text-sm bg-transparent outline-hidden"
|
|
|
type="number"
|
|
|
placeholder={$i18n.t('Leave empty for unlimited')}
|
|
|
bind:value={RAGConfig.FILE_MAX_COUNT}
|