{ updateOpenAIHandler(); updateOllamaUrlsHandler(); dispatch('save'); }} >
{#if ENABLE_OPENAI_API !== null && ENABLE_OLLAMA_API !== null}
{$i18n.t('OpenAI API')}
{ updateOpenAIConfig(localStorage.token, ENABLE_OPENAI_API); }} />
{#if ENABLE_OPENAI_API}
{#each OPENAI_API_BASE_URLS as url, idx}
{#if pipelineUrls[url]}
{/if}
{#if idx === 0} {:else} {/if}
{$i18n.t('WebUI will make requests to')} '{url}/models'
{/each}
{/if}

{$i18n.t('Ollama API')}
{ updateOllamaConfig(localStorage.token, ENABLE_OLLAMA_API); if (OLLAMA_BASE_URLS.length === 0) { OLLAMA_BASE_URLS = ['']; } }} />
{#if ENABLE_OLLAMA_API}
{#each OLLAMA_BASE_URLS as url, idx}
{#if idx === 0} {:else} {/if}
{/each}
{$i18n.t('Trouble accessing Ollama?')} {$i18n.t('Click here for help.')}
{/if}
{:else}
{/if}