{ updateOpenAIHandler(); updateOllamaHandler(); dispatch('save'); }} >
{#if ENABLE_OPENAI_API !== null && ENABLE_OLLAMA_API !== null}
{$i18n.t('OpenAI API')}
{ updateOpenAIHandler(); }} />
{#if ENABLE_OPENAI_API}
{$i18n.t('Manage OpenAI API Connections')}
{ showAddOpenAIConnectionModal = true; }} type="button" >
{#each OPENAI_API_BASE_URLS as url, idx}
{ updateOpenAIHandler(); }} onDelete={() => { OPENAI_API_BASE_URLS = OPENAI_API_BASE_URLS.filter( (url, urlIdx) => idx !== urlIdx ); OPENAI_API_KEYS = OPENAI_API_KEYS.filter((key, keyIdx) => idx !== keyIdx); }} /> {/each}
{/if}
{$i18n.t('Ollama API')}
{ updateOllamaHandler(); }} />
{#if ENABLE_OLLAMA_API}
{$i18n.t('Manage Ollama API Connections')}
{ showAddOllamaConnectionModal = true; }} type="button" >
{#each OLLAMA_BASE_URLS as url, idx}
{ updateOllamaHandler(); }} onDelete={() => { OLLAMA_BASE_URLS = OLLAMA_BASE_URLS.filter((url, urlIdx) => idx !== urlIdx); }} /> {/each}
{$i18n.t('Trouble accessing Ollama?')}
{$i18n.t('Click here for help.')}
{/if}
{:else}
{/if}
{$i18n.t('Save')}