Unverified50% confidenceFactExact time
openai-php/client's createStreamed() automatically sets stream: true; after enabling include_usage, the choices of the last chunk is an empty array, so you must check with isset before reading it.
1
Sources
50%
Confidence
Medium-term (~90 days)
Relevance
10/17/2026
First Seen
Valid until: 1/15/2027
Sources
Related Entities
Related Claims
UnverifiedIn the OpenAI API, when a request sets stream: true, the response is split into multiple SSE events, each containing a JSON chunk where the choices[0].delta field contains the incrementally generated content, and the end of the stream is signaled by data: [DONE].69% similarUnverifiedBoth useChat and useCompletion implement streaming output based on the Web Streams API.63% similarUnverifiedUsing the Fetch API's ReadableStream to handle streaming responses is more flexible than EventSource, because it supports POST requests and custom request headers, whereas EventSource only supports GET requests.62% similarUnverifiedWHATWG began drafting the Streams specification in 2014; the core concepts of the Web Streams API include ReadableStream, WritableStream, and TransformStream, with a backpressure mechanism to prevent memory overflow.60% similar
Cite This Claim
Stable URI
https://kongchang.com/claim/1054777API
curl https://kongchang.com/api/v1/knowledge/claims/1054777MCP
get_claim(id=1054777)