{ updateOpenAIHandler(); updateOllamaUrlsHandler(); updateLdapServerHandler(); dispatch('save'); }} >
{#if ENABLE_OPENAI_API !== null && ENABLE_OLLAMA_API !== null && ENABLE_LDAP !== 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}
{ OPENAI_API_BASE_URLS = [...OPENAI_API_BASE_URLS, '']; OPENAI_API_KEYS = [...OPENAI_API_KEYS, '']; }} type="button" >
{:else}
{ OPENAI_API_BASE_URLS = OPENAI_API_BASE_URLS.filter( (url, urlIdx) => idx !== urlIdx ); OPENAI_API_KEYS = OPENAI_API_KEYS.filter((key, keyIdx) => idx !== keyIdx); }} type="button" >
{/if}
{ verifyOpenAIHandler(idx); }} type="button" >
{$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}
{ OLLAMA_BASE_URLS = [...OLLAMA_BASE_URLS, '']; }} type="button" >
{:else}
{ OLLAMA_BASE_URLS = OLLAMA_BASE_URLS.filter( (url, urlIdx) => idx !== urlIdx ); }} type="button" >
{/if}
{ verifyOllamaHandler(idx); }} type="button" >
{/each}
{$i18n.t('Trouble accessing Ollama?')}
{$i18n.t('Click here for help.')}
{/if}
{$i18n.t('LDAP')}
{ updateLdapConfig(localStorage.token, ENABLE_LDAP); }} />
{#if ENABLE_LDAP}
{$i18n.t('Label')}
{$i18n.t('Host')}
{$i18n.t('Port')}
{$i18n.t('Application DN')}
{$i18n.t('Application DN Password')}
{$i18n.t('Attribute for Username')}
{$i18n.t('Search Base')}
{$i18n.t('Search Filters')}
{$i18n.t('Click here for filter guides.')}
{$i18n.t('TLS')}
{#if LDAP_SERVER.use_tls}
{$i18n.t('Certificate Path')}
{$i18n.t('Ciphers')}
{/if}
{/if}
{:else}
{/if}
{$i18n.t('Save')}