This commit is contained in:
Timothy Jaeryang Baek 2025-11-09 20:39:05 -05:00
parent e69c2cf3f6
commit 908f504885

View file

@ -35,12 +35,7 @@
import { goto } from '$app/navigation';
import { onMount, tick, getContext } from 'svelte';
import {
OLLAMA_API_BASE_URL,
OPENAI_API_BASE_URL,
WEBUI_API_BASE_URL,
WEBUI_BASE_URL
} from '$lib/constants';
import { WEBUI_BASE_URL } from '$lib/constants';
import { WEBUI_NAME, config, user, models, settings } from '$lib/stores';
import { chatCompletion } from '$lib/apis/openai';
@ -189,7 +184,10 @@ Based on the user's instruction, update and enhance the existing notes or select
{
model: model.id,
stream: true,
messages: chatMessages
messages: chatMessages.map((m) => ({
role: m.role,
content: m.content
}))
// ...(files && files.length > 0 ? { files } : {}) // TODO: Decide whether to use native file handling or not
},
`${WEBUI_BASE_URL}/api`