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
bc1a7ab5
Commit
bc1a7ab5
authored
Jun 09, 2024
by
Timothy J. Baek
Browse files
fix: playground
parent
b565301a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
18 deletions
+8
-18
src/lib/components/workspace/Playground.svelte
src/lib/components/workspace/Playground.svelte
+8
-18
No files found.
src/lib/components/workspace/Playground.svelte
View file @
bc1a7ab5
...
...
@@ -80,8 +80,6 @@
if (stopResponseFlag) {
controller.abort('User: Stop Response');
}
currentRequestId = null;
break;
}
...
...
@@ -97,11 +95,7 @@
let data = JSON.parse(line.replace(/^data: /, ''));
console.log(data);
if ('request_id' in data) {
currentRequestId = data.request_id;
} else {
text += data.choices[0].delta.content ?? '';
}
text += data.choices[0].delta.content ?? '';
}
}
}
...
...
@@ -178,21 +172,17 @@
let data = JSON.parse(line.replace(/^data: /, ''));
console.log(data);
if (
'
re
quest_id' in data
) {
c
urrentRequestId = data.request_id
;
if (re
sponseMessage.content == '' && data.choices[0].delta.content == '\n'
) {
c
ontinue
;
} else {
if (responseMessage.content == '' && data.choices[0].delta.content == '\n') {
continue;
} else {
textareaElement.style.height = textareaElement.scrollHeight + 'px';
textareaElement.style.height = textareaElement.scrollHeight + 'px';
responseMessage.content += data.choices[0].delta.content ?? '';
messages = messages;
responseMessage.content += data.choices[0].delta.content ?? '';
messages = messages;
textareaElement.style.height = textareaElement.scrollHeight + 'px';
textareaElement.style.height = textareaElement.scrollHeight + 'px';
await tick();
}
await tick();
}
}
}
...
...
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