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
371dfc11
Unverified
Commit
371dfc11
authored
Mar 24, 2024
by
Timothy Jaeryang Baek
Committed by
GitHub
Mar 24, 2024
Browse files
Merge branch 'dev' into debug_print
parents
f74f2ea7
a1faa307
Changes
42
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
+7
-7
src/routes/(app)/c/[id]/+page.svelte
src/routes/(app)/c/[id]/+page.svelte
+3
-3
src/routes/(app)/playground/+page.svelte
src/routes/(app)/playground/+page.svelte
+4
-4
No files found.
src/routes/(app)/c/[id]/+page.svelte
View file @
371dfc11
...
@@ -19,7 +19,7 @@
...
@@ -19,7 +19,7 @@
}
from
'$lib/stores'
;
}
from
'$lib/stores'
;
import
{
copyToClipboard
,
splitStream
,
convertMessagesToHistory
}
from
'$lib/utils'
;
import
{
copyToClipboard
,
splitStream
,
convertMessagesToHistory
}
from
'$lib/utils'
;
import
{
generateChatCompletion
,
generateTitle
,
cancel
ChatCompletion
}
from
'$lib/apis/ollama'
;
import
{
generateChatCompletion
,
generateTitle
,
cancel
OllamaRequest
}
from
'$lib/apis/ollama'
;
import
{
import
{
addTagById
,
addTagById
,
createNewChat
,
createNewChat
,
...
@@ -382,7 +382,7 @@
...
@@ -382,7 +382,7 @@
if
(
stopResponseFlag
)
{
if
(
stopResponseFlag
)
{
controller
.
abort
(
'User: Stop Response'
);
controller
.
abort
(
'User: Stop Response'
);
await
cancel
ChatCompletion
(
localStorage
.
token
,
currentRequestId
);
await
cancel
OllamaRequest
(
localStorage
.
token
,
currentRequestId
);
}
}
currentRequestId
=
null
;
currentRequestId
=
null
;
...
@@ -843,7 +843,7 @@
...
@@ -843,7 +843,7 @@
shareEnabled
={
messages
.
length
>
0
}
shareEnabled
={
messages
.
length
>
0
}
initNewChat
={
async
()
=>
{
initNewChat
={
async
()
=>
{
if
(
currentRequestId
!== null) {
if
(
currentRequestId
!== null) {
await
cancel
ChatCompletion
(
localStorage
.
token
,
currentRequestId
);
await
cancel
OllamaRequest
(
localStorage
.
token
,
currentRequestId
);
currentRequestId
=
null
;
currentRequestId
=
null
;
}
}
...
...
src/routes/(app)/playground/+page.svelte
View file @
371dfc11
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
} from '$lib/constants';
} from '$lib/constants';
import { WEBUI_NAME, config, user, models, settings } from '$lib/stores';
import { WEBUI_NAME, config, user, models, settings } from '$lib/stores';
import { cancel
ChatCompletion
, generateChatCompletion } from '$lib/apis/ollama';
import { cancel
OllamaRequest
, generateChatCompletion } from '$lib/apis/ollama';
import { generateOpenAIChatCompletion } from '$lib/apis/openai';
import { generateOpenAIChatCompletion } from '$lib/apis/openai';
import { splitStream } from '$lib/utils';
import { splitStream } from '$lib/utils';
...
@@ -52,7 +52,7 @@
...
@@ -52,7 +52,7 @@
// const cancelHandler = async () => {
// const cancelHandler = async () => {
// if (currentRequestId) {
// if (currentRequestId) {
// const res = await cancel
ChatCompletion
(localStorage.token, currentRequestId);
// const res = await cancel
OllamaRequest
(localStorage.token, currentRequestId);
// currentRequestId = null;
// currentRequestId = null;
// loading = false;
// loading = false;
// }
// }
...
@@ -95,7 +95,7 @@
...
@@ -95,7 +95,7 @@
const { value, done } = await reader.read();
const { value, done } = await reader.read();
if (done || stopResponseFlag) {
if (done || stopResponseFlag) {
if (stopResponseFlag) {
if (stopResponseFlag) {
await cancel
ChatCompletion
(localStorage.token, currentRequestId);
await cancel
OllamaRequest
(localStorage.token, currentRequestId);
}
}
currentRequestId = null;
currentRequestId = null;
...
@@ -181,7 +181,7 @@
...
@@ -181,7 +181,7 @@
const { value, done } = await reader.read();
const { value, done } = await reader.read();
if (done || stopResponseFlag) {
if (done || stopResponseFlag) {
if (stopResponseFlag) {
if (stopResponseFlag) {
await cancel
ChatCompletion
(localStorage.token, currentRequestId);
await cancel
OllamaRequest
(localStorage.token, currentRequestId);
}
}
currentRequestId = null;
currentRequestId = null;
...
...
Prev
1
2
3
Next
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