Class LlmRequest
java.lang.Object
com.google.adk.JsonBaseModel
com.google.adk.models.LlmRequest
Represents a request to be sent to the LLM.
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic LlmRequest.Builderbuilder()abstract Optional<com.google.genai.types.GenerateContentConfig> config()Returns the configuration for content generation.abstract List<com.google.genai.types.Content> contents()Returns the list of content sent to the LLM.returns the first system instruction text from the request if present.com.google.common.collect.ImmutableList<String> Returns all system instruction texts from the request as an immutable list.abstract com.google.genai.types.LiveConnectConfigReturns the configuration for live connections.model()Returns the name of the LLM model to be used.abstract LlmRequest.Buildertools()Returns a map of tools available to the LLM.Methods inherited from class com.google.adk.JsonBaseModel
fromJsonNode, fromJsonString, getMapper, toJson, toJsonNode, toJsonString
-
Constructor Details
-
LlmRequest
public LlmRequest()
-
-
Method Details
-
model
-
contents
Returns the list of content sent to the LLM.- Returns:
- A list of
Contentobjects.
-
config
Returns the configuration for content generation.- Returns:
- An optional
GenerateContentConfigobject containing the generation settings.
-
liveConnectConfig
public abstract com.google.genai.types.LiveConnectConfig liveConnectConfig()Returns the configuration for live connections. Populated using the RunConfig in the InvocationContext.- Returns:
- An optional
LiveConnectConfigobject containing the live connection settings.
-
tools
-
getFirstSystemInstruction
-
getSystemInstructions
Returns all system instruction texts from the request as an immutable list. -
builder
-
toBuilder
-