VibeKit supports streaming responses, allowing you to receive data from the API in real-time as it is generated.
generateCode
method, use the event-driven approach with .on()
listeners. The API will emit events as data is generated.
Event | Type | Description |
---|---|---|
update | (message: string) => void | Emitted with streaming content updates as they are generated |
error | (error: string) => void | Emitted when errors occur during streaming |
error
event listener to provide good user experience