Table of Contents

Class LiveClientToolResponse

Namespace
Google.GenAI.Types
Assembly
Google.GenAI.dll

Client generated response to a ToolCall received from the server. Individual FunctionResponse objects are matched to the respective FunctionCall objects by the id field. Note that in the unary and server-streaming GenerateContent APIs function calling happens by exchanging the Content parts, while in the bidi GenerateContent APIs function calling happens over this dedicated set of messages.

public record LiveClientToolResponse : IEquatable<LiveClientToolResponse>
Inheritance
LiveClientToolResponse
Implements
Inherited Members

Properties

FunctionResponses

The response to the function calls.

[JsonPropertyName("functionResponses")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public List<FunctionResponse>? FunctionResponses { get; set; }

Property Value

List<FunctionResponse>

Methods

FromJson(string, JsonSerializerOptions?)

Deserializes a JSON string to a LiveClientToolResponse object.

public static LiveClientToolResponse? FromJson(string jsonString, JsonSerializerOptions? options = null)

Parameters

jsonString string

The JSON string to deserialize.

options JsonSerializerOptions

Optional JsonSerializerOptions.

Returns

LiveClientToolResponse

The deserialized LiveClientToolResponse object, or null if deserialization fails.