From ba4b0db4629db049f5b16cfa22764d13e2d422a8 Mon Sep 17 00:00:00 2001 From: SleepyYui Date: Thu, 13 Feb 2025 22:05:41 +0100 Subject: [PATCH] fix playground text completion --- src/lib/components/playground/Completions.svelte | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/components/playground/Completions.svelte b/src/lib/components/playground/Completions.svelte index abc3b8db1..9a369df92 100644 --- a/src/lib/components/playground/Completions.svelte +++ b/src/lib/components/playground/Completions.svelte @@ -6,7 +6,7 @@ import { WEBUI_BASE_URL } from '$lib/constants'; 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 Selector from '$lib/components/chat/ModelSelector/Selector.svelte'; @@ -40,7 +40,7 @@ const textCompletionHandler = async () => { const model = $models.find((model) => model.id === selectedModelId); - const [res, controller] = await generateOpenAIChatCompletion( + const [res, controller] = await chatCompletion( localStorage.token, { model: model.id,