mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-12 04:15:25 +00:00
refac
This commit is contained in:
parent
e69c2cf3f6
commit
908f504885
1 changed files with 5 additions and 7 deletions
|
|
@ -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`
|
||||
|
|
|
|||
Loading…
Reference in a new issue