diff --git a/src/lib/apis/ollama/index.ts b/src/lib/apis/ollama/index.ts index b7f842177..efc3f0d0f 100644 --- a/src/lib/apis/ollama/index.ts +++ b/src/lib/apis/ollama/index.ts @@ -164,7 +164,7 @@ export const getOllamaVersion = async (token: string = '') => { throw error; } - return res?.version ?? ''; + return res?.version ?? false; }; export const getOllamaModels = async (token: string = '') => { diff --git a/src/lib/components/chat/Settings/Models.svelte b/src/lib/components/chat/Settings/Models.svelte index c99de9251..7254f2d27 100644 --- a/src/lib/components/chat/Settings/Models.svelte +++ b/src/lib/components/chat/Settings/Models.svelte @@ -18,6 +18,7 @@ import { onMount, getContext } from 'svelte'; import Tooltip from '$lib/components/common/Tooltip.svelte'; + import Spinner from '$lib/components/common/Spinner.svelte'; const i18n = getContext('i18n'); @@ -34,7 +35,8 @@ let updateProgress = null; let showExperimentalOllama = false; - let ollamaVersion = ''; + + let ollamaVersion = null; const MAX_PARALLEL_DOWNLOADS = 3; let modelTransferring = false; @@ -449,7 +451,7 @@
- {#if ollamaVersion} + {#if ollamaVersion !== null}
{$i18n.t('Manage Ollama Models')}
@@ -880,8 +882,14 @@ {/if}
- {:else} + {:else if ollamaVersion === false}
Ollama Not Detected
+ {:else} +
+
+ +
+
{/if}
diff --git a/src/lib/components/common/Spinner.svelte b/src/lib/components/common/Spinner.svelte index 4b7f5e396..a22f56dcb 100644 --- a/src/lib/components/common/Spinner.svelte +++ b/src/lib/components/common/Spinner.svelte @@ -1,9 +1,9 @@ -
- +