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.Builder
builder()
close()
Returns whether the connection should be closed.abstract Optional
<com.google.genai.types.Content> content()
Returns the content of the request.static LiveRequest
fromJsonString
(String json) Deserializes a Json string to aLiveRequest
object.boolean
Extracts boolean value from the close field or returns false if unset.abstract LiveRequest.Builder
Methods 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
Content
object 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
Blob
object 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 aLiveRequest
object.
-