Table of Contents

Class LiveClientMessage

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

Messages sent by the client in the API call.

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

Properties

ClientContent

Incremental update of the current conversation delivered from the client.

[JsonPropertyName("clientContent")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public LiveClientContent? ClientContent { get; set; }

Property Value

LiveClientContent

RealtimeInput

User input that is sent in real time.

[JsonPropertyName("realtimeInput")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public LiveClientRealtimeInput? RealtimeInput { get; set; }

Property Value

LiveClientRealtimeInput

RealtimeInputParameters

This is an alias for realtime_input field. Allows the inputs to sendRealtimeInput to be transformed into realtime_input before being sent. Note: This will overwrite any realtime_input field.

[JsonPropertyName("realtimeInputParameters")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public LiveSendRealtimeInputParameters? RealtimeInputParameters { get; set; }

Property Value

LiveSendRealtimeInputParameters

Setup

Message to be sent by the system when connecting to the API. SDK users should not send this message.

[JsonPropertyName("setup")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public LiveClientSetup? Setup { get; set; }

Property Value

LiveClientSetup

ToolResponse

Response to a ToolCallMessage received from the server.

[JsonPropertyName("toolResponse")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public LiveClientToolResponse? ToolResponse { get; set; }

Property Value

LiveClientToolResponse

Methods

FromJson(string, JsonSerializerOptions?)

Deserializes a JSON string to a LiveClientMessage object.

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

Parameters

jsonString string

The JSON string to deserialize.

options JsonSerializerOptions

Optional JsonSerializerOptions.

Returns

LiveClientMessage

The deserialized LiveClientMessage object, or null if deserialization fails.