diff --git a/src/lib/components/chat/Messages.svelte b/src/lib/components/chat/Messages.svelte index 9efab1e52..e8b9a80fe 100644 --- a/src/lib/components/chat/Messages.svelte +++ b/src/lib/components/chat/Messages.svelte @@ -11,12 +11,12 @@ import ResponseMessage from './Messages/ResponseMessage.svelte'; import Placeholder from './Messages/Placeholder.svelte'; import Spinner from '../common/Spinner.svelte'; + import { cancelChatCompletion } from '$lib/apis/ollama'; export let chatId = ''; export let sendPrompt: Function; export let continueGeneration: Function; export let regenerateResponse: Function; - export let stopResponse: Function; export let processing = ''; export let bottomPadding = false; @@ -229,7 +229,7 @@ await updateChatById(localStorage.token, chatId, { history }); await chats.set(await getChatList(localStorage.token)); - stopResponse(); + await cancelChatCompletion(localStorage.token, chatId); }; diff --git a/src/routes/(app)/+page.svelte b/src/routes/(app)/+page.svelte index b93dc860a..33409ec32 100644 --- a/src/routes/(app)/+page.svelte +++ b/src/routes/(app)/+page.svelte @@ -828,7 +828,6 @@ {sendPrompt} {continueGeneration} {regenerateResponse} - {stopResponse} /> diff --git a/src/routes/(app)/c/[id]/+page.svelte b/src/routes/(app)/c/[id]/+page.svelte index 737a13e0e..be84467da 100644 --- a/src/routes/(app)/c/[id]/+page.svelte +++ b/src/routes/(app)/c/[id]/+page.svelte @@ -858,7 +858,6 @@ {sendPrompt} {continueGeneration} {regenerateResponse} - {stopResponse} />