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

fix: fix SSE formatting
This commit is contained in:
Atream 2025-02-27 12:19:23 +08:00 committed by GitHub
commit 798e1d0cfa
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -73,7 +73,7 @@ class RunStepDelta(Object):
class Done():
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):

View File

@ -75,4 +75,4 @@ class ChatCompletionChunk(ChatCompletionBase):
]
def to_stream_reply(self):
return f"data:{self.model_dump_json()}\n\n"
return f"data: {self.model_dump_json()}\n\n"