This commit is contained in:
Timothy Jaeryang Baek 2024-11-15 22:09:06 -08:00
parent d5f84d6234
commit 4eb8b1450c
2 changed files with 4 additions and 10 deletions

View File

@ -376,19 +376,12 @@
{#if embeddingEngine === 'ollama'} {#if embeddingEngine === 'ollama'}
<div class="flex w-full"> <div class="flex w-full">
<div class="flex-1 mr-2"> <div class="flex-1 mr-2">
<select <input
class="w-full rounded-lg py-2 px-4 text-sm bg-gray-50 dark:text-gray-300 dark:bg-gray-850 outline-none" class="w-full rounded-lg py-2 px-4 text-sm bg-gray-50 dark:text-gray-300 dark:bg-gray-850 outline-none"
bind:value={embeddingModel} bind:value={embeddingModel}
placeholder={$i18n.t('Select a model')} placeholder={$i18n.t('Set embedding model')}
required required
> />
{#if !embeddingModel}
<option value="" disabled selected>{$i18n.t('Select a model')}</option>
{/if}
{#each $models.filter((m) => m.id && m.ollama && !(m?.preset ?? false)) as model}
<option value={model.id} class="bg-gray-50 dark:bg-gray-700">{model.name}</option>
{/each}
</select>
</div> </div>
</div> </div>
{:else} {:else}

View File

@ -81,6 +81,7 @@
}); });
} }
_models.set(await getModels(localStorage.token));
await init(); await init();
}; };