mirror of
https://github.com/open-webui/open-webui
synced 2025-06-15 02:41:30 +00:00
feat: external reranker settings ui
This commit is contained in:
parent
be912f1529
commit
3dc34c2402
@ -645,6 +645,41 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
{#if RAGConfig.ENABLE_RAG_HYBRID_SEARCH === true}
|
{#if RAGConfig.ENABLE_RAG_HYBRID_SEARCH === true}
|
||||||
|
<div class=" mb-2.5 flex flex-col w-full justify-between">
|
||||||
|
<div class="flex w-full justify-between">
|
||||||
|
<div class=" self-center text-xs font-medium">
|
||||||
|
{$i18n.t('Reranking Engine')}
|
||||||
|
</div>
|
||||||
|
<div class="flex items-center relative">
|
||||||
|
<select
|
||||||
|
class="dark:bg-gray-900 w-fit pr-8 rounded-sm px-2 p-1 text-xs bg-transparent outline-hidden text-right"
|
||||||
|
bind:value={RAGConfig.RAG_RERANKING_ENGINE}
|
||||||
|
placeholder="Select a reranking model engine"
|
||||||
|
>
|
||||||
|
<option value="">{$i18n.t('Default (SentenceTransformers)')}</option>
|
||||||
|
<option value="external">{$i18n.t('External')}</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{#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"
|
||||||
|
placeholder={$i18n.t('API Base URL')}
|
||||||
|
bind:value={RAGConfig.RAG_EXTERNAL_RERANKER_URL}
|
||||||
|
required
|
||||||
|
/>
|
||||||
|
|
||||||
|
<SensitiveInput
|
||||||
|
placeholder={$i18n.t('API Key')}
|
||||||
|
bind:value={RAGConfig.RAG_EXTERNAL_RERANKER_API_URL}
|
||||||
|
required={false}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
{/if}
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class=" mb-2.5 flex flex-col w-full">
|
<div class=" mb-2.5 flex flex-col w-full">
|
||||||
<div class=" mb-1 text-xs font-medium">{$i18n.t('Reranking Model')}</div>
|
<div class=" mb-1 text-xs font-medium">{$i18n.t('Reranking Model')}</div>
|
||||||
|
|
||||||
@ -656,9 +691,10 @@
|
|||||||
placeholder={$i18n.t('Set reranking model (e.g. {{model}})', {
|
placeholder={$i18n.t('Set reranking model (e.g. {{model}})', {
|
||||||
model: 'BAAI/bge-reranker-v2-m3'
|
model: 'BAAI/bge-reranker-v2-m3'
|
||||||
})}
|
})}
|
||||||
bind:value={rerankingModel}
|
bind:value={RAGConfig.RAG_RERANKING_MODEL}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
{#if RAGConfig.RAG_RERANKING_ENGINE === ''}
|
||||||
<button
|
<button
|
||||||
class="px-2.5 bg-transparent text-gray-800 dark:bg-transparent dark:text-gray-100 rounded-lg transition"
|
class="px-2.5 bg-transparent text-gray-800 dark:bg-transparent dark:text-gray-100 rounded-lg transition"
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
@ -712,6 +748,7 @@
|
|||||||
</svg>
|
</svg>
|
||||||
{/if}
|
{/if}
|
||||||
</button>
|
</button>
|
||||||
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user