Feat: Support for Structured Output Streaming Strategies #195
Closed
nikas-belogolov
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Currently, @tanstack/ai provides excellent support for streaming text and handling final structured outputs via Zod schemas. However, for complex UIs (like real-time dashboards or forms being filled by AI), waiting for the entire JSON object to resolve before rendering can feel slow.
I propose adding Streaming Strategies for Structured Outputs. This would allow developers to access "partial" state of a Zod schema as it streams in, similar to how libraries like ai sdk (Vercel) handle it with streamObject.
This could be achieved by Integrating a parser like best-effort-json-parser or incomplete-json-parser.
Beta Was this translation helpful? Give feedback.
All reactions