mirror of
https://github.com/open-webui/open-webui
synced 2025-06-16 19:31:52 +00:00
fix playground text completion
This commit is contained in:
parent
e4d7d41df6
commit
ba4b0db462
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
import { WEBUI_BASE_URL } from '$lib/constants';
|
import { WEBUI_BASE_URL } from '$lib/constants';
|
||||||
import { WEBUI_NAME, config, user, models, settings, showSidebar } from '$lib/stores';
|
import { WEBUI_NAME, config, user, models, settings, showSidebar } from '$lib/stores';
|
||||||
import { generateOpenAIChatCompletion } from '$lib/apis/openai';
|
import { chatCompletion } from '$lib/apis/openai';
|
||||||
|
|
||||||
import { splitStream } from '$lib/utils';
|
import { splitStream } from '$lib/utils';
|
||||||
import Selector from '$lib/components/chat/ModelSelector/Selector.svelte';
|
import Selector from '$lib/components/chat/ModelSelector/Selector.svelte';
|
||||||
@ -40,7 +40,7 @@
|
|||||||
const textCompletionHandler = async () => {
|
const textCompletionHandler = async () => {
|
||||||
const model = $models.find((model) => model.id === selectedModelId);
|
const model = $models.find((model) => model.id === selectedModelId);
|
||||||
|
|
||||||
const [res, controller] = await generateOpenAIChatCompletion(
|
const [res, controller] = await chatCompletion(
|
||||||
localStorage.token,
|
localStorage.token,
|
||||||
{
|
{
|
||||||
model: model.id,
|
model: model.id,
|
||||||
|
Loading…
Reference in New Issue
Block a user