feat: arena models

This commit is contained in:
Timothy J. Baek
2024-10-22 03:16:48 -07:00
parent ee16177924
commit 9f285fb2fb
29 changed files with 974 additions and 43 deletions

View File

@@ -61,6 +61,15 @@
href="/admin">{$i18n.t('Dashboard')}</a
>
<a
class="min-w-fit rounded-full p-1.5 px-3 {$page.url.pathname.includes(
'/admin/evaluations'
)
? 'bg-gray-50 dark:bg-gray-850'
: ''} transition"
href="/admin/evaluations">{$i18n.t('Evaluations')}</a
>
<a
class="min-w-fit rounded-full p-1.5 px-3 {$page.url.pathname.includes(
'/admin/settings'

View File

@@ -0,0 +1,5 @@
<script>
import Evaluations from '$lib/components/admin/Evaluations.svelte';
</script>
<Evaluations />

View File

@@ -184,7 +184,7 @@
if (model.info.base_model_id) {
const base_model = $models
.filter((m) => !m?.preset)
.filter((m) => !m?.preset && m?.owned_by !== 'arena')
.find((m) =>
[model.info.base_model_id, `${model.info.base_model_id}:latest`].includes(m.id)
);
@@ -451,7 +451,7 @@
required
>
<option value={null} class=" text-gray-900">{$i18n.t('Select a base model')}</option>
{#each $models.filter((m) => !m?.preset) as model}
{#each $models.filter((m) => !m?.preset && m?.owned_by !== 'arena') as model}
<option value={model.id} class=" text-gray-900">{model.name}</option>
{/each}
</select>

View File

@@ -139,7 +139,7 @@
const _id = $page.url.searchParams.get('id');
if (_id) {
model = $models.find((m) => m.id === _id);
model = $models.find((m) => m.id === _id && m?.owned_by !== 'arena');
if (model) {
id = model.id;
name = model.name;
@@ -395,7 +395,7 @@
required
>
<option value={null} class=" text-gray-900">{$i18n.t('Select a base model')}</option>
{#each $models.filter((m) => m.id !== model.id && !m?.preset) as model}
{#each $models.filter((m) => m.id !== model.id && !m?.preset && m?.owned_by !== 'arena') as model}
<option value={model.id} class=" text-gray-900">{model.name}</option>
{/each}
</select>