Class LiveRequest
java.lang.Object
com.google.adk.JsonBaseModel
com.google.adk.agents.LiveRequest
Represents a request to be sent to a live connection to the LLM model.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionabstract Optional<com.google.genai.types.Blob> blob()Returns the blob of the request.static LiveRequest.Builderbuilder()close()Returns whether the connection should be closed.abstract Optional<com.google.genai.types.Content> content()Returns the content of the request.static LiveRequestfromJsonString(String json) Deserializes a Json string to aLiveRequestobject.booleanExtracts boolean value from the close field or returns false if unset.abstract LiveRequest.BuilderMethods inherited from class com.google.adk.JsonBaseModel
fromJsonNode, fromJsonString, getMapper, toJson, toJsonNode, toJsonString
-
Method Details
-
content
Returns the content of the request.If set, send the content to the model in turn-by-turn mode.
- Returns:
- An optional
Contentobject containing the content of the request.
-
blob
Returns the blob of the request.If set, send the blob to the model in realtime mode.
- Returns:
- An optional
Blobobject containing the blob of the request.
-
close
-
shouldClose
public boolean shouldClose()Extracts boolean value from the close field or returns false if unset. -
builder
-
toBuilder
-
fromJsonString
Deserializes a Json string to aLiveRequestobject.
-