Class ApigeeLlm.Builder
java.lang.Object
com.google.adk.models.ApigeeLlm.Builder
- Enclosing class:
ApigeeLlm
-
Constructor Details
-
Builder
protected Builder()
-
-
Method Details
-
modelName
Sets the model string. The model string specifies the LLM provider (e.g., Vertex AI, Gemini), API version, and the model ID.Format:
apigee/[<provider>/][<version>/]<model_id>Components:
provider(optional):vertex_aiorgemini. If omitted, behavior depends on theGOOGLE_GENAI_USE_VERTEXAIenvironment variable. If that is not set toTRUEor1, it defaults togemini.version(optional): The API version (e.g.,v1,v1beta). If omitted, the default version for the provider is used.model_id(required): The model identifier (e.g.,gemini-2.5-flash).
Examples:
apigee/gemini-2.5-flashapigee/v1/gemini-2.5-flashapigee/vertex_ai/gemini-2.5-flashapigee/gemini/v1/gemini-2.5-flashapigee/vertex_ai/v1beta/gemini-2.5-flash
- Parameters:
modelName- the model string.- Returns:
- this builder.
-
proxyUrl
Sets the URL of the Apigee proxy. If not set, it will be read from theAPIGEE_PROXY_URLenvironment variable.- Parameters:
proxyUrl- the Apigee proxy URL.- Returns:
- this builder.
-
customHeaders
Sets a dictionary of headers to be sent with the request.- Parameters:
customHeaders- the custom headers.- Returns:
- this builder.
-
build
Builds theApigeeLlminstance.- Returns:
- a new
ApigeeLlminstance. - Throws:
NullPointerException- if modelName is null.IllegalArgumentException- if the model string is invalid.
-