Class CustomCodeExecutionSpec.Builder

java.lang.Object
com.google.genai.types.CustomCodeExecutionSpec.Builder
Enclosing class:
CustomCodeExecutionSpec

public abstract static class CustomCodeExecutionSpec.Builder extends Object
Builder for CustomCodeExecutionSpec.
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • evaluationFunction

      public abstract CustomCodeExecutionSpec.Builder evaluationFunction(String evaluationFunction)
      Setter for evaluationFunction.

      evaluationFunction: A string representing a user-defined function for evaluation. Expected user to define the following function, e.g.: def evaluate(instance: dict[str, Any]) -> float: Please include this function signature in the code snippet. Instance is the evaluation instance, any fields populated in the instance are available to the function as instance[field_name].

    • clearEvaluationFunction

      @CanIgnoreReturnValue public CustomCodeExecutionSpec.Builder clearEvaluationFunction()
      Clears the value of evaluationFunction field.
    • codeExecutionRegion

      public abstract CustomCodeExecutionSpec.Builder codeExecutionRegion(String codeExecutionRegion)
      Setter for codeExecutionRegion.

      codeExecutionRegion: Optional. The region to use for code execution. If set, the Code Execution Sandbox will be invoked in the specified region regardless of the request's originating region. Must be a region where the Code Execution Sandbox is available. Supported regions: northamerica-northeast1, southamerica-east1, us-central1, us-east1, us-east4, us-west1, us-west4, europe-central2, europe-north1, europe-southwest1, europe-west1, europe-west2, europe-west3, europe-west4, europe-west6, europe-west8, europe-west9, me-west1, asia-east1, asia-east2, asia-northeast1, asia-northeast3, asia-south1, asia-south2, asia-southeast1, australia-southeast2. If unset, the request's originating region is used; requests from regions where the sandbox is unavailable will fail with UNIMPLEMENTED.

    • clearCodeExecutionRegion

      @CanIgnoreReturnValue public CustomCodeExecutionSpec.Builder clearCodeExecutionRegion()
      Clears the value of codeExecutionRegion field.
    • build

      public abstract CustomCodeExecutionSpec build()