diff --git a/src/lib/components/chat/SettingsModal.svelte b/src/lib/components/chat/SettingsModal.svelte index 2e951e01..95495b7c 100644 --- a/src/lib/components/chat/SettingsModal.svelte +++ b/src/lib/components/chat/SettingsModal.svelte @@ -50,10 +50,12 @@ if (API_BASE_URL === '') { API_BASE_URL = BUILD_TIME_API_BASE_URL; } - const res = await getModels(API_BASE_URL, 'ollama'); + const _models = await getModels(API_BASE_URL, 'ollama'); - if (res) { + if (_models.length > 0) { toast.success('Server connection verified'); + await models.set(_models); + saveSettings({ API_BASE_URL: API_BASE_URL }); diff --git a/src/lib/components/layout/Navbar.svelte b/src/lib/components/layout/Navbar.svelte index eb11d028..9bf15a07 100644 --- a/src/lib/components/layout/Navbar.svelte +++ b/src/lib/components/layout/Navbar.svelte @@ -1,5 +1,8 @@ @@ -14,8 +17,10 @@