Skip to content

@chinmaymk/aikit v0.0.40


@chinmaymk/aikit / processStream

Function: processStream()

processStream(stream, handlers): Promise<StreamResult>

Defined in: stream-utils.ts:71

Parameters

stream

AsyncIterable<StreamChunk>

handlers

onDelta?

(delta) => void

onContent?

(content) => void

onToolCalls?

(toolCalls) => void

onFinish?

(finishReason) => void

onChunk?

(chunk) => void

onReasoning?

(reasoning) => void

onUsage?

(usage) => void

Returns

Promise<StreamResult>

Released under the MIT License.