mirror of
https://github.com/open-webui/open-webui
synced 2025-06-26 18:26:48 +00:00
refac: evaluations settings ui
This commit is contained in:
parent
ce7cf62a55
commit
8c4d967ef4
@ -103,10 +103,12 @@
|
|||||||
<div class="overflow-y-scroll scrollbar-hidden h-full">
|
<div class="overflow-y-scroll scrollbar-hidden h-full">
|
||||||
{#if evaluationConfig !== null}
|
{#if evaluationConfig !== null}
|
||||||
<div class="">
|
<div class="">
|
||||||
<div class="text-sm font-medium mb-2">{$i18n.t('General Settings')}</div>
|
<div class="mb-3">
|
||||||
|
<div class=" mb-2.5 text-base font-medium">{$i18n.t('General')}</div>
|
||||||
|
|
||||||
<div class=" mb-2">
|
<hr class=" border-gray-100 dark:border-gray-850 my-2" />
|
||||||
<div class="flex justify-between items-center text-xs">
|
|
||||||
|
<div class="mb-2.5 flex w-full justify-between">
|
||||||
<div class=" text-xs font-medium">{$i18n.t('Arena Models')}</div>
|
<div class=" text-xs font-medium">{$i18n.t('Arena Models')}</div>
|
||||||
|
|
||||||
<Tooltip content={$i18n.t(`Message rating should be enabled to use this feature`)}>
|
<Tooltip content={$i18n.t(`Message rating should be enabled to use this feature`)}>
|
||||||
@ -116,46 +118,50 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
{#if evaluationConfig.ENABLE_EVALUATION_ARENA_MODELS}
|
{#if evaluationConfig.ENABLE_EVALUATION_ARENA_MODELS}
|
||||||
<hr class=" border-gray-50 dark:border-gray-700/10 my-2" />
|
<div class="mb-3">
|
||||||
|
<div class=" mb-2.5 text-base font-medium flex justify-between items-center">
|
||||||
<div class="flex justify-between items-center mb-2">
|
<div>
|
||||||
<div class="text-sm font-medium">{$i18n.t('Manage Arena Models')}</div>
|
{$i18n.t('Manage')}
|
||||||
|
|
||||||
<div>
|
|
||||||
<Tooltip content={$i18n.t('Add Arena Model')}>
|
|
||||||
<button
|
|
||||||
class="p-1"
|
|
||||||
type="button"
|
|
||||||
on:click={() => {
|
|
||||||
showAddModel = true;
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<Plus />
|
|
||||||
</button>
|
|
||||||
</Tooltip>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="flex flex-col gap-2">
|
|
||||||
{#if (evaluationConfig?.EVALUATION_ARENA_MODELS ?? []).length > 0}
|
|
||||||
{#each evaluationConfig.EVALUATION_ARENA_MODELS as model, index}
|
|
||||||
<Model
|
|
||||||
{model}
|
|
||||||
on:edit={(e) => {
|
|
||||||
editModelHandler(e.detail, index);
|
|
||||||
}}
|
|
||||||
on:delete={(e) => {
|
|
||||||
deleteModelHandler(index);
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
{/each}
|
|
||||||
{:else}
|
|
||||||
<div class=" text-center text-xs text-gray-500">
|
|
||||||
{$i18n.t(
|
|
||||||
`Using the default arena model with all models. Click the plus button to add custom models.`
|
|
||||||
)}
|
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
|
||||||
|
<div>
|
||||||
|
<Tooltip content={$i18n.t('Add Arena Model')}>
|
||||||
|
<button
|
||||||
|
class="p-1"
|
||||||
|
type="button"
|
||||||
|
on:click={() => {
|
||||||
|
showAddModel = true;
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<Plus />
|
||||||
|
</button>
|
||||||
|
</Tooltip>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<hr class=" border-gray-100 dark:border-gray-850 my-2" />
|
||||||
|
|
||||||
|
<div class="flex flex-col gap-2">
|
||||||
|
{#if (evaluationConfig?.EVALUATION_ARENA_MODELS ?? []).length > 0}
|
||||||
|
{#each evaluationConfig.EVALUATION_ARENA_MODELS as model, index}
|
||||||
|
<Model
|
||||||
|
{model}
|
||||||
|
on:edit={(e) => {
|
||||||
|
editModelHandler(e.detail, index);
|
||||||
|
}}
|
||||||
|
on:delete={(e) => {
|
||||||
|
deleteModelHandler(index);
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
{/each}
|
||||||
|
{:else}
|
||||||
|
<div class=" text-center text-xs text-gray-500">
|
||||||
|
{$i18n.t(
|
||||||
|
`Using the default arena model with all models. Click the plus button to add custom models.`
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
{/if}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user