Skip to content

Documentation / @agentick/google / mapGoogleChunk

Function: mapGoogleChunk()

mapGoogleChunk(chunk): AdapterDelta | AdapterDelta[] | null

Defined in: google.ts:395

Map a Google GenerateContentResponse chunk to adapter deltas. Handles all part types (text, functionCall) and finishReason in a single pass. Returns an array when a chunk contains multiple parts (parallel tool calls, text + tool call, or parts + finishReason).

Parameters

chunk

GenerateContentResponse

Returns

AdapterDelta | AdapterDelta[] | null

Released under the ISC License.