Streaming
Stream chat completions in real-time using Server-Sent Events.
Usage
Set stream: true in your request:
Stream format
Each chunk is a Server-Sent Event with JSON data:
tip
The OpenAI SDK handles streaming automatically. Use
client.chat.completions.create({stream: true}) for automatic streaming.