Skip to content
This repository was archived by the owner on Jun 5, 2025. It is now read-only.

fix: add space after data: sse_stream_generator #1087

Merged
merged 1 commit into from
Feb 18, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/codegate/providers/litellmshim/generators.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ async def sse_stream_generator(stream: AsyncIterator[Any]) -> AsyncIterator[str]
# this might even allow us to tighten the typing of the stream
chunk = chunk.model_dump_json(exclude_none=True, exclude_unset=True)
try:
yield f"data:{chunk}\n\n"
yield f"data: {chunk}\n\n"
except Exception as e:
yield f"data:{str(e)}\n\n"
yield f"data: {str(e)}\n\n"
except Exception as e:
yield f"data: {str(e)}\n\n"
finally:
Expand Down