{editingItem ? $i18n.t('Edit Knowledge Connection') : $i18n.t('Add Knowledge Connection')}

{#if sourceForm.provider !== 'pgvector'}
{/if}
{#if sourceForm.provider === 'milvus'}
{/if}
{#if sourceForm.provider === 'pgvector'}
{/if}
{$i18n.t( 'External vectors must be generated with the same embedding model configured in Open WebUI.' )}

{ if (editingItem) { try { await updateKnowledgeAccessGrants( localStorage.token, editingItem.id, accessGrants ); editingItem.access_grants = structuredClone(accessGrants); toast.success($i18n.t('Saved')); } catch (error) { accessGrants = structuredClone(editingItem.access_grants ?? []); toast.error(`${error}`); } } }} />
{$i18n.t('settings.admin.integrations.externalKnowledge.title')}
{#each items as item} {@const connection = connectionForItem(item)}
{' '} {item?.meta?.external?.provider ?? connection?.provider} {item?.meta?.external?.source?.name ? `ยท ${item.meta.external.source.name}` : ''}
{ toggleSource(item); }} />
{/each}
{#if loading}
{:else if items.length === 0}
{$i18n.t('No external knowledge sources configured.')}
{/if} {#if items.length === 0}
{$i18n.t('Test must pass before a source is created.')}
{/if}