Spaces:
Runtime error
Runtime error
Implemented streaming message updates by appending content to the output and updating the streamingMessage content.
Browse files
src/lib/components/Playground/Playground.svelte
CHANGED
|
@@ -77,7 +77,8 @@
|
|
| 77 |
})) {
|
| 78 |
if (chunk.choices && chunk.choices.length > 0) {
|
| 79 |
if (streamingMessage && chunk.choices[0]?.delta?.content) {
|
| 80 |
-
|
|
|
|
| 81 |
messages = [...messages];
|
| 82 |
}
|
| 83 |
}
|
|
|
|
| 77 |
})) {
|
| 78 |
if (chunk.choices && chunk.choices.length > 0) {
|
| 79 |
if (streamingMessage && chunk.choices[0]?.delta?.content) {
|
| 80 |
+
out += chunk.choices[0].delta.content;
|
| 81 |
+
streamingMessage.content = out;
|
| 82 |
messages = [...messages];
|
| 83 |
}
|
| 84 |
}
|