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
4ad7ef84
Commit
4ad7ef84
authored
Apr 26, 2024
by
Arman Ordookhani
Browse files
add else
parent
74496342
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
src/lib/apis/streaming/index.ts
src/lib/apis/streaming/index.ts
+1
-1
No files found.
src/lib/apis/streaming/index.ts
View file @
4ad7ef84
...
...
@@ -31,7 +31,7 @@ async function* openAIStreamToIterator(
console
.
log
(
line
);
if
(
line
===
'
data: [DONE]
'
)
{
yield
{
done
:
true
,
value
:
''
};
}
if
(
line
.
startsWith
(
'
:
'
))
{
}
else
if
(
line
.
startsWith
(
'
:
'
))
{
// Events starting with : are comments https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#event_stream_format
// OpenRouter sends heartbeats like ": OPENROUTER PROCESSING"
continue
...
...
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