OptionalcancellationToken: CancellationTokenProtecteddoneProtected ReadonlymessageProtected ReadonlyrequestProtected ReadonlystreamProtectedterminalProtected ReadonlytoDispose this object.
ProtectedhandleDelivers a part to the consumer. Parts arriving after the iterator is done (e.g. from a tool handler that finishes after cancellation or after the consumer abandoned the iteration) are dropped.
NOTE: 'next' is defined using a tuple to ensure we report the correct assignability errors in all places.
ProtectedregisterTerminates the iteration when the consumer abandons it, be it by breaking out of a for await loop or
by that loop exiting with an error. Without this, the producer would keep requesting completions,
executing tool calls and buffering parts that nobody will ever read.
Deprecated
Use
ChatCompletionStreamingAsyncIteratorfrom './openai-chat-completion-stream' instead.