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
Unverified在 OpenAI API 中,当请求设置 stream: true 时,响应被拆分为多个 SSE 事件,每个事件包含一个 JSON chunk,choices[0].delta 字段包含增量生成内容,流的结束由 data: [DONE] 标记信号指示69% similarUnverifiedBoth useChat and useCompletion implement streaming output based on the Web Streams API.63% similarUnverified使用Fetch API的ReadableStream处理流式响应比EventSource更灵活,因为它支持POST请求和自定义请求头,而EventSource只支持GET请求62% similarUnverifiedWHATWG 从2014年开始起草 Streams 规范,Web Streams API 核心概念包括 ReadableStream、WritableStream 与 TransformStream,具备背压机制防止内存溢出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)