Class GoogleGenAIPluginOptions.Builder

java.lang.Object
com.google.genkit.plugins.googlegenai.GoogleGenAIPluginOptions.Builder
Enclosing class:
GoogleGenAIPluginOptions

public static class GoogleGenAIPluginOptions.Builder extends Object
Builder for GoogleGenAIPluginOptions.
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • apiKey

      public GoogleGenAIPluginOptions.Builder apiKey(String apiKey)
      Sets the API key for Gemini Developer API.
      Parameters:
      apiKey - the API key
      Returns:
      this builder
    • project

      public GoogleGenAIPluginOptions.Builder project(String project)
      Sets the Google Cloud project ID for Vertex AI.
      Parameters:
      project - the project ID
      Returns:
      this builder
    • location

      public GoogleGenAIPluginOptions.Builder location(String location)
      Sets the Google Cloud location for Vertex AI.
      Parameters:
      location - the location
      Returns:
      this builder
    • vertexAI

      public GoogleGenAIPluginOptions.Builder vertexAI(boolean vertexAI)
      Sets whether to use Vertex AI backend.
      Parameters:
      vertexAI - true to use Vertex AI, false for Gemini Developer API
      Returns:
      this builder
    • apiVersion

      public GoogleGenAIPluginOptions.Builder apiVersion(String apiVersion)
      Sets the API version.
      Parameters:
      apiVersion - the API version (e.g., "v1", "v1beta")
      Returns:
      this builder
    • baseUrl

      public GoogleGenAIPluginOptions.Builder baseUrl(String baseUrl)
      Sets the base URL override.
      Parameters:
      baseUrl - the base URL
      Returns:
      this builder
    • timeout

      public GoogleGenAIPluginOptions.Builder timeout(int timeout)
      Sets the request timeout in milliseconds.
      Parameters:
      timeout - the timeout in milliseconds
      Returns:
      this builder
    • build

      public GoogleGenAIPluginOptions build()
      Builds the GoogleGenAIPluginOptions.
      Returns:
      the built options