Skip to content

Conversation

chenmoneygithub
Copy link
Collaborator

Previously we limit stream listeners to only work with str field and some prebuilt types. This PR lifts up the constraint, and allow streaming on any types. Here is the gist:

  • StreamLIstener works the same way as before, i.e., only capture streaming chunks associated with a certain field.
  • We don't perform additional handling on the structured output value for each field, but just give back the value.

To accomodate JSONAdapter, which doesn't have clear boilerplate like [[ ## answer ## ]] that splits the fields' streaming in ChatAdapter, we make specific logic chunk based on jiter to handle it.

@chenmoneygithub chenmoneygithub marked this pull request as draft September 20, 2025 01:07
@chenmoneygithub chenmoneygithub marked this pull request as ready for review September 20, 2025 22:44
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.

1 participant