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
ox696c
ktransformers
Commits
798e1d0c
Unverified
Commit
798e1d0c
authored
Feb 27, 2025
by
Atream
Committed by
GitHub
Feb 27, 2025
Browse files
Merge pull request #532 from xv44586/fix-sse-formatting
fix: fix SSE formatting
parents
f403cde6
b05cc568
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
ktransformers/server/schemas/assistants/streaming.py
ktransformers/server/schemas/assistants/streaming.py
+1
-1
ktransformers/server/schemas/endpoints/chat.py
ktransformers/server/schemas/endpoints/chat.py
+1
-1
No files found.
ktransformers/server/schemas/assistants/streaming.py
View file @
798e1d0c
...
@@ -73,7 +73,7 @@ class RunStepDelta(Object):
...
@@ -73,7 +73,7 @@ class RunStepDelta(Object):
class
Done
():
class
Done
():
def
to_stream_reply
(
self
):
def
to_stream_reply
(
self
):
return
f
"
event: done
\n
data: [DONE]
\n\n
"
return
f
"data: [DONE]
\n\n
"
async
def
check_client_link
(
request
:
Request
,
async_events
:
AsyncIterable
):
async
def
check_client_link
(
request
:
Request
,
async_events
:
AsyncIterable
):
...
...
ktransformers/server/schemas/endpoints/chat.py
View file @
798e1d0c
...
@@ -75,4 +75,4 @@ class ChatCompletionChunk(ChatCompletionBase):
...
@@ -75,4 +75,4 @@ class ChatCompletionChunk(ChatCompletionBase):
]
]
def
to_stream_reply
(
self
):
def
to_stream_reply
(
self
):
return
f
"data:
{
self
.
model_dump_json
()
}
\n\n
"
return
f
"data:
{
self
.
model_dump_json
()
}
\n\n
"
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