Table of Contents

Class LiveClientContent

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

Incremental update of the current conversation delivered from the client. All the content here will unconditionally be appended to the conversation history and used as part of the prompt to the model to generate content. A message here will interrupt any current model generation.

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

Properties

TurnComplete

If true, indicates that the server content generation should start with the currently accumulated prompt. Otherwise, the server will await additional messages before starting generation.

[JsonPropertyName("turnComplete")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public bool? TurnComplete { get; set; }

Property Value

bool?

Turns

The content appended to the current conversation with the model. For single-turn queries, this is a single instance. For multi-turn queries, this is a repeated field that contains conversation history and latest request.

[JsonPropertyName("turns")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public List<Content>? Turns { get; set; }

Property Value

List<Content>

Methods

FromJson(string, JsonSerializerOptions?)

Deserializes a JSON string to a LiveClientContent object.

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

Parameters

jsonString string

The JSON string to deserialize.

options JsonSerializerOptions

Optional JsonSerializerOptions.

Returns

LiveClientContent

The deserialized LiveClientContent object, or null if deserialization fails.