Class GoogleGenAIPluginOptions
java.lang.Object
com.google.genkit.plugins.googlegenai.GoogleGenAIPluginOptions
Options for configuring the Google GenAI plugin.
The plugin can be configured to use either:
- Gemini Developer API (default): Set the API key
- Vertex AI API: Set project, location, and enable vertexAI
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder for GoogleGenAIPluginOptions. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a new builder.Gets the API key.Gets the API version.Gets the base URL override.Gets the Google Cloud location (for Vertex AI).Gets the Google Cloud project ID (for Vertex AI).intGets the request timeout in milliseconds.booleanReturns whether to use Vertex AI backend.com.google.genai.types.HttpOptionsConverts these options to HttpOptions for the Google GenAI SDK.
-
Method Details
-
builder
Creates a new builder.- Returns:
- a new builder
-
getApiKey
Gets the API key.- Returns:
- the API key
-
getProject
Gets the Google Cloud project ID (for Vertex AI).- Returns:
- the project ID
-
getLocation
Gets the Google Cloud location (for Vertex AI).- Returns:
- the location
-
isVertexAI
public boolean isVertexAI()Returns whether to use Vertex AI backend.- Returns:
- true if using Vertex AI, false for Gemini Developer API
-
getApiVersion
Gets the API version.- Returns:
- the API version
-
getBaseUrl
Gets the base URL override.- Returns:
- the base URL
-
getTimeout
public int getTimeout()Gets the request timeout in milliseconds.- Returns:
- the timeout in milliseconds
-
toHttpOptions
public com.google.genai.types.HttpOptions toHttpOptions()Converts these options to HttpOptions for the Google GenAI SDK.- Returns:
- HttpOptions
-