Feature Description
Enable streaming output while maintaining JSON schema enforcement, yielding valid partial JSON as it's generated.
Motivation
For UX-sensitive applications (chatbots, real-time dashboards), streaming responses while maintaining structure would improve perceived latency.
Current Limitation
Structured generation currently requires waiting for the full output before validation/delivery.
Proposed Approach
Stream tokens while maintaining a running FSM state, yielding complete sub-objects as they become valid.
This would combine the best of structured output guarantees with the UX benefits of streaming. Great project!
Feature Description
Enable streaming output while maintaining JSON schema enforcement, yielding valid partial JSON as it's generated.
Motivation
For UX-sensitive applications (chatbots, real-time dashboards), streaming responses while maintaining structure would improve perceived latency.
Current Limitation
Structured generation currently requires waiting for the full output before validation/delivery.
Proposed Approach
Stream tokens while maintaining a running FSM state, yielding complete sub-objects as they become valid.
This would combine the best of structured output guarantees with the UX benefits of streaming. Great project!