fix playground text completion

This commit is contained in:
SleepyYui 2025-02-13 22:05:41 +01:00
parent e4d7d41df6
commit ba4b0db462

View File

@ -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,