GoogleJsonAccumulator
Namespace: Vercel.AI.Google
public sealed class GoogleJsonAccumulatorBuilds 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
Methods
Section titled “Methods”Finalize()
Section titled “Finalize()”public GooglePartialArgumentsFinal Finalize()Closes any open containers and returns the suffix required to finish the JSON text.
Returns: GooglePartialArgumentsFinal
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
Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product