Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace custom SSE reader with source for System.Net.ServerSentEvents #33

Merged
merged 5 commits into from
Jun 14, 2024

Conversation

stephentoub
Copy link
Contributor

A stable package for the new System.Net.ServerSentEvents library isn't yet available, but until one is we can switch the code over to using a source copy.

The natural replacement for ServerSentEvent is SseItem<string>, but I used SseItem<byte[]> instead just to avoid an unnecessary UTF8->UTF16->UTF8 roundtrip. It could be taken further in the future to avoid allocation by doing more of the parsing inside of the callback passed to SseParser.

A stable package for the new System.Net.ServerSentEvents library isn't yet available, but until one is we can switch the code over to using a source copy.
@trrwilson trrwilson merged commit 674e0f7 into openai:main Jun 14, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants