Internal
Pipe the stream through a processing function.
The function to process the input stream.
Optionalresponse: AzureOpenAiChatCompletionStreamResponse<any>
The AzureOpenAiChatCompletionStreamResponse object for process function to store finish reason, token usage, etc.
The output stream containing processed items.
OptionalchoiceIndex: numberConverts this stream to a newline-delimited JSON ReadableStream.
A ReadableStream of UTF-8 encoded NDJSON bytes.
Static_Internal
Create a chat completion stream based on the http response.
Http response.
Chat completion stream.
Static_Internal
Wrap raw chunk data with chunk response class to provide helper functions.
Chat completion stream.
Static_Internal
Transform a stream of chunks into a stream of content strings.
Chat completion stream.
OptionalchoiceIndex: number
The index of the choice to parse.
Static_Static_Static_Protected Statictransform
Chat completion stream containing post-processing functions.