mirror of
https://github.com/open-webui/open-webui
synced 2025-02-23 13:51:07 +00:00
Merge pull request #9942 from SleepyYui/bugfix-9635
fix: Fix text completion on playground page
This commit is contained in:
commit
deeb04e695
@ -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