aiChatStream
Syntax
aiChatStream(messages, callback, params, options)Parameters
Parameter
Type
Required
Description
Options Structure
Option
Type
Default
Description
Returns
Examples
Basic Streaming
Build Complete Response
UI Integration
With Progress Tracking
Error Handling in Callback
Streaming with Parameters
Multiple Providers
Streaming to File
Server-Sent Events (SSE) Integration
Conversation Streaming
Callback Function Signature
Use Cases
✅ Long Responses
✅ Real-Time UI Updates
✅ Progress Indication
✅ Server-Sent Events
✅ Token-by-Token Processing
❌ Short Responses
❌ When You Need Complete Response First
Notes
Related Functions
Performance Tips
Last updated