-
Notifications
You must be signed in to change notification settings - Fork 228
Implementation of the first layer of the SSE Implementation for the Generator to consume #7535
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
base: main
Are you sure you want to change the base?
Conversation
…enerator to consume
streaming.visit(new GetStreamingResponseTerminator()).orElse("\n"); | ||
String prefix = ":data "; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The prefix value ":data "
doesn't match the DEFAULT_VALUE_PREFIX
of "data: "
defined in Stream.java. This inconsistency will cause SSE parsing to fail since the stream parser will be looking for lines starting with "data: "
but the actual data will be prefixed with ":data "
. Please update this value to "data: "
to ensure consistent behavior with the default implementation.
String prefix = ":data "; | |
String prefix = "data: "; |
Spotted by Diamond
Is this helpful? React 👍 or 👎 to let us know.
Description
Fern SDKs support a variety of powerful features like auto-pagination, retries, and streaming. Java supports newline-delimited JSON streaming, but we haven't built out server-side event (SSE) streaming yet. This PR is the first step in enabling the generator to accept SSE on Java
Changes Made
Testing