Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
open-webui
Commits
95b8edf6
Commit
95b8edf6
authored
Feb 20, 2024
by
Danny Liu
Browse files
use cancelChatCompletion API call instead of stopResponse function
parent
51b59403
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
2 additions
and
4 deletions
+2
-4
src/lib/components/chat/Messages.svelte
src/lib/components/chat/Messages.svelte
+2
-2
src/routes/(app)/+page.svelte
src/routes/(app)/+page.svelte
+0
-1
src/routes/(app)/c/[id]/+page.svelte
src/routes/(app)/c/[id]/+page.svelte
+0
-1
No files found.
src/lib/components/chat/Messages.svelte
View file @
95b8edf6
...
@@ -11,12 +11,12 @@
...
@@ -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 @@
...
@@ -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>
...
...
src/routes/(app)/+page.svelte
View file @
95b8edf6
...
@@ -828,7 +828,6 @@
...
@@ -828,7 +828,6 @@
{sendPrompt}
{sendPrompt}
{continueGeneration}
{continueGeneration}
{regenerateResponse}
{regenerateResponse}
{stopResponse}
/>
/>
</div>
</div>
</div>
</div>
...
...
src/routes/(app)/c/[id]/+page.svelte
View file @
95b8edf6
...
@@ -858,7 +858,6 @@
...
@@ -858,7 +858,6 @@
{sendPrompt}
{sendPrompt}
{continueGeneration}
{continueGeneration}
{regenerateResponse}
{regenerateResponse}
{stopResponse}
/>
/>
</div>
</div>
</div>
</div>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment