Merge pull request #9942 from SleepyYui/bugfix-9635

fix: Fix text completion on playground page
This commit is contained in:
Timothy Jaeryang Baek 2025-02-13 13:14:11 -08:00 committed by GitHub
commit deeb04e695
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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,