Class LiveClientContent
-
- All Implemented Interfaces:
public abstract class LiveClientContent extends JsonSerializable
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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public abstract classLiveClientContent.BuilderBuilder for LiveClientContent.
-
Field Summary
Fields Modifier and Type Field Description public final static StringMAX_READ_LENGTH_PROPERTY
-
Constructor Summary
Constructors Constructor Description LiveClientContent()
-
Method Summary
Modifier and Type Method Description abstract Optional<List<Content>>turns()The content appended to the current conversation with the model. abstract Optional<Boolean>turnComplete()If true, indicates that the server content generation should start with the currently accumulated prompt. static LiveClientContent.Builderbuilder()Instantiates a builder for LiveClientContent. abstract LiveClientContent.BuildertoBuilder()Creates a builder with the same values as this instance. static LiveClientContentfromJson(String jsonString)Deserializes a JSON string to a LiveClientContent object. -
Methods inherited from class com.google.genai.JsonSerializable
fromJsonNode, fromJsonString, objectMapper, setMaxReadLength, stringToJsonNode, toJson, toJsonNode, toJsonString -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
turns
abstract Optional<List<Content>> 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.
-
turnComplete
abstract Optional<Boolean> 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.
-
builder
static LiveClientContent.Builder builder()
Instantiates a builder for LiveClientContent.
-
toBuilder
abstract LiveClientContent.Builder toBuilder()
Creates a builder with the same values as this instance.
-
fromJson
static LiveClientContent fromJson(String jsonString)
Deserializes a JSON string to a LiveClientContent object.
-
-
-
-