From f5bca7c4d8d3611c4608d2a30117b8e659c0a275 Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Wed, 18 Oct 2023 03:15:10 -0700 Subject: [PATCH] Update +page.svelte --- src/routes/+page.svelte | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index 428a23178..5b4aefe15 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -12,11 +12,12 @@ import { openDB, deleteDB } from 'idb'; import { ENDPOINT as SERVER_ENDPOINT } from '$lib/contants'; + import Error from './+error.svelte'; export let data: PageData; $: ({ models, OLLAMA_ENDPOINT } = data); - const ENDPOINT = OLLAMA_ENDPOINT ? OLLAMA_ENDPOINT : SERVER_ENDPOINT; + let ENDPOINT; let textareaElement; let db; @@ -31,6 +32,11 @@ let messages = []; onMount(async () => { + ENDPOINT = OLLAMA_ENDPOINT ? OLLAMA_ENDPOINT : SERVER_ENDPOINT; + console.log(OLLAMA_ENDPOINT); + console.log(SERVER_ENDPOINT); + console.log(ENDPOINT); + let settings = localStorage.getItem('settings'); if (settings) { settings = JSON.parse(settings);