forked from open-webui/open-webui
use cancelChatCompletion API call instead of stopResponse function
This commit is contained in:
parent
51b594036d
commit
95b8edf6b3
3 changed files with 2 additions and 4 deletions
|
@ -11,12 +11,12 @@
|
||||||
import ResponseMessage from './Messages/ResponseMessage.svelte';
|
import ResponseMessage from './Messages/ResponseMessage.svelte';
|
||||||
import Placeholder from './Messages/Placeholder.svelte';
|
import Placeholder from './Messages/Placeholder.svelte';
|
||||||
import Spinner from '../common/Spinner.svelte';
|
import Spinner from '../common/Spinner.svelte';
|
||||||
|
import { cancelChatCompletion } from '$lib/apis/ollama';
|
||||||
|
|
||||||
export let chatId = '';
|
export let chatId = '';
|
||||||
export let sendPrompt: Function;
|
export let sendPrompt: Function;
|
||||||
export let continueGeneration: Function;
|
export let continueGeneration: Function;
|
||||||
export let regenerateResponse: Function;
|
export let regenerateResponse: Function;
|
||||||
export let stopResponse: Function;
|
|
||||||
|
|
||||||
export let processing = '';
|
export let processing = '';
|
||||||
export let bottomPadding = false;
|
export let bottomPadding = false;
|
||||||
|
@ -229,7 +229,7 @@
|
||||||
|
|
||||||
await updateChatById(localStorage.token, chatId, { history });
|
await updateChatById(localStorage.token, chatId, { history });
|
||||||
await chats.set(await getChatList(localStorage.token));
|
await chats.set(await getChatList(localStorage.token));
|
||||||
stopResponse();
|
await cancelChatCompletion(localStorage.token, chatId);
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
@ -828,7 +828,6 @@
|
||||||
{sendPrompt}
|
{sendPrompt}
|
||||||
{continueGeneration}
|
{continueGeneration}
|
||||||
{regenerateResponse}
|
{regenerateResponse}
|
||||||
{stopResponse}
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -858,7 +858,6 @@
|
||||||
{sendPrompt}
|
{sendPrompt}
|
||||||
{continueGeneration}
|
{continueGeneration}
|
||||||
{regenerateResponse}
|
{regenerateResponse}
|
||||||
{stopResponse}
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue