mirror of
https://github.com/open-webui/open-webui
synced 2024-11-25 13:29:53 +00:00
Update +page.svelte
This commit is contained in:
parent
36b3ec9474
commit
f5bca7c4d8
@ -12,11 +12,12 @@
|
|||||||
|
|
||||||
import { openDB, deleteDB } from 'idb';
|
import { openDB, deleteDB } from 'idb';
|
||||||
import { ENDPOINT as SERVER_ENDPOINT } from '$lib/contants';
|
import { ENDPOINT as SERVER_ENDPOINT } from '$lib/contants';
|
||||||
|
import Error from './+error.svelte';
|
||||||
|
|
||||||
export let data: PageData;
|
export let data: PageData;
|
||||||
$: ({ models, OLLAMA_ENDPOINT } = data);
|
$: ({ models, OLLAMA_ENDPOINT } = data);
|
||||||
|
|
||||||
const ENDPOINT = OLLAMA_ENDPOINT ? OLLAMA_ENDPOINT : SERVER_ENDPOINT;
|
let ENDPOINT;
|
||||||
let textareaElement;
|
let textareaElement;
|
||||||
let db;
|
let db;
|
||||||
|
|
||||||
@ -31,6 +32,11 @@
|
|||||||
let messages = [];
|
let messages = [];
|
||||||
|
|
||||||
onMount(async () => {
|
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');
|
let settings = localStorage.getItem('settings');
|
||||||
if (settings) {
|
if (settings) {
|
||||||
settings = JSON.parse(settings);
|
settings = JSON.parse(settings);
|
||||||
|
Loading…
Reference in New Issue
Block a user