mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-14 21:35:19 +00:00
26 lines
661 B
Svelte
26 lines
661 B
Svelte
<script>
|
|
import { getContext, onMount } from 'svelte';
|
|
const i18n = getContext('i18n');
|
|
|
|
import ManageOllama from './ManageOllama.svelte';
|
|
|
|
export let ollamaConfig = null;
|
|
|
|
let selectedUrlIdx = 0;
|
|
</script>
|
|
|
|
{#if ollamaConfig}
|
|
<div class="flex-1 mb-2.5 pr-1.5 rounded-lg bg-gray-50 dark:text-gray-300 dark:bg-gray-850">
|
|
<select
|
|
class="w-full py-2 px-4 text-sm outline-none bg-transparent"
|
|
bind:value={selectedUrlIdx}
|
|
placeholder={$i18n.t('Select an Ollama instance')}
|
|
>
|
|
{#each ollamaConfig.OLLAMA_BASE_URLS as url, idx}
|
|
<option value={idx}>{url}</option>
|
|
{/each}
|
|
</select>
|
|
</div>
|
|
|
|
<ManageOllama urlIdx={selectedUrlIdx} />
|
|
{/if}
|