Streaming responses
Set "stream": true. Chunks arrive as server-sent events in the OpenAI delta format.
event stream
data: {{"choices":[{{"delta":{{"content":"Chào"}}}}]}} data: {{"choices":[{{"delta":{{"content":" bạn"}}}}]}} data: [DONE]
Notes
- The final chunk carries
usagewhenstream_options.include_usageis set. - Keep-alive comments may appear; ignore lines starting with
:. - Terminate on
data: [DONE]or on a non-200 status.