endpoint error fixed

This commit is contained in:
Timothy J. Baek 2023-10-18 03:10:01 -07:00
parent 5d07c3634b
commit 36b3ec9474
2 changed files with 5 additions and 2 deletions

View file

@ -20,6 +20,6 @@ export const load: PageServerLoad = async ({ url }) => {
return {
models: models?.models ?? [],
ENDPOINT: ENDPOINT
OLLAMA_ENDPOINT: process.env.OLLAMA_ENDPOINT
};
};

View file

@ -11,9 +11,12 @@
import { onMount, tick } from 'svelte';
import { openDB, deleteDB } from 'idb';
import { ENDPOINT as SERVER_ENDPOINT } from '$lib/contants';
export let data: PageData;
$: ({ models, ENDPOINT } = data);
$: ({ models, OLLAMA_ENDPOINT } = data);
const ENDPOINT = OLLAMA_ENDPOINT ? OLLAMA_ENDPOINT : SERVER_ENDPOINT;
let textareaElement;
let db;