Skip to content

GoogleJsonAccumulator

Namespace: Vercel.AI.Google

public sealed class GoogleJsonAccumulator

Builds a JSON object from Gemini streaming partialArgs chunks. Concatenated text deltas plus Finalize() match the serialized object. Keys such as __proto__ are stored as ordinary properties.

Inheritance: object

View source

public GooglePartialArgumentsFinal Finalize()

Closes any open containers and returns the suffix required to finish the JSON text.

Returns: GooglePartialArgumentsFinal

View source

Process(IReadOnlyList<GooglePartialArgument>?)

Section titled “Process(IReadOnlyList<GooglePartialArgument>?)”
public GooglePartialArgumentsUpdate Process(IReadOnlyList<GooglePartialArgument>? partialArgs)

Applies one batch of partial arguments.

Parameters

Name Type Description
partialArgs IReadOnlyList<GooglePartialArgument>

Returns: GooglePartialArgumentsUpdate

View source

Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product