"git@developer.sourcefind.cn:OpenDAS/vision.git" did not exist on "c542137c612e28e098bc4d78258cb6438b3805f0"
Unverified Commit 798e1d0c authored by Atream's avatar Atream Committed by GitHub
Browse files

Merge pull request #532 from xv44586/fix-sse-formatting

fix: fix SSE formatting
parents f403cde6 b05cc568
...@@ -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\ndata: [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):
......
...@@ -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"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment