Class ComputerUse.Builder

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

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

    • Builder

      public Builder()
  • Method Details

    • environment

      public abstract ComputerUse.Builder environment(Environment environment)
      Setter for environment.

      environment: Required. The environment being operated.

    • clearEnvironment

      @CanIgnoreReturnValue public ComputerUse.Builder clearEnvironment()
      Clears the value of environment field.
    • environment

      @CanIgnoreReturnValue public ComputerUse.Builder environment(Environment.Known knownType)
      Setter for environment given a known enum.

      environment: Required. The environment being operated.

    • environment

      @CanIgnoreReturnValue public ComputerUse.Builder environment(String environment)
      Setter for environment given a string.

      environment: Required. The environment being operated.

    • excludedPredefinedFunctions

      public abstract ComputerUse.Builder excludedPredefinedFunctions(List<String> excludedPredefinedFunctions)
      Setter for excludedPredefinedFunctions.

      excludedPredefinedFunctions: Optional. By default, [predefined functions](https://cloud.google.com/vertex-ai/generative-ai/docs/computer-use#supported-actions) are included in the final model call. Some of them can be explicitly excluded from being automatically included. This can serve two purposes: 1. Using a more restricted / different action space. 2. Improving the definitions / instructions of predefined functions.

    • excludedPredefinedFunctions

      @CanIgnoreReturnValue public ComputerUse.Builder excludedPredefinedFunctions(String... excludedPredefinedFunctions)
      Setter for excludedPredefinedFunctions.

      excludedPredefinedFunctions: Optional. By default, [predefined functions](https://cloud.google.com/vertex-ai/generative-ai/docs/computer-use#supported-actions) are included in the final model call. Some of them can be explicitly excluded from being automatically included. This can serve two purposes: 1. Using a more restricted / different action space. 2. Improving the definitions / instructions of predefined functions.

    • clearExcludedPredefinedFunctions

      @CanIgnoreReturnValue public ComputerUse.Builder clearExcludedPredefinedFunctions()
      Clears the value of excludedPredefinedFunctions field.
    • enablePromptInjectionDetection

      public abstract ComputerUse.Builder enablePromptInjectionDetection(boolean enablePromptInjectionDetection)
      Setter for enablePromptInjectionDetection.

      enablePromptInjectionDetection: Optional. Enables the prompt injection detection check on computer-use request.

    • clearEnablePromptInjectionDetection

      @CanIgnoreReturnValue public ComputerUse.Builder clearEnablePromptInjectionDetection()
      Clears the value of enablePromptInjectionDetection field.
    • disabledSafetyPolicies

      public abstract ComputerUse.Builder disabledSafetyPolicies(List<SafetyPolicy> disabledSafetyPolicies)
      Setter for disabledSafetyPolicies.

      disabledSafetyPolicies: Optional. Disabled safety policies for computer use. This field is not supported in Vertex AI.

    • disabledSafetyPolicies

      @CanIgnoreReturnValue public ComputerUse.Builder disabledSafetyPolicies(SafetyPolicy... disabledSafetyPolicies)
      Setter for disabledSafetyPolicies.

      disabledSafetyPolicies: Optional. Disabled safety policies for computer use. This field is not supported in Vertex AI.

    • clearDisabledSafetyPolicies

      @CanIgnoreReturnValue public ComputerUse.Builder clearDisabledSafetyPolicies()
      Clears the value of disabledSafetyPolicies field.
    • disabledSafetyPolicies

      @CanIgnoreReturnValue public ComputerUse.Builder disabledSafetyPolicies(String... disabledSafetyPolicies)
      Setter for disabledSafetyPolicies given a varargs of strings.

      disabledSafetyPolicies: Optional. Disabled safety policies for computer use. This field is not supported in Vertex AI.

    • disabledSafetyPolicies

      @CanIgnoreReturnValue public ComputerUse.Builder disabledSafetyPolicies(SafetyPolicy.Known... knownTypes)
      Setter for disabledSafetyPolicies given a varargs of known enums.

      disabledSafetyPolicies: Optional. Disabled safety policies for computer use. This field is not supported in Vertex AI.

    • disabledSafetyPoliciesFromKnown

      @CanIgnoreReturnValue public ComputerUse.Builder disabledSafetyPoliciesFromKnown(List<SafetyPolicy.Known> knownTypes)
      Setter for disabledSafetyPolicies given a list of known enums.

      disabledSafetyPolicies: Optional. Disabled safety policies for computer use. This field is not supported in Vertex AI.

    • disabledSafetyPoliciesFromString

      @CanIgnoreReturnValue public ComputerUse.Builder disabledSafetyPoliciesFromString(List<String> disabledSafetyPolicies)
      Setter for disabledSafetyPolicies given a list of strings.

      disabledSafetyPolicies: Optional. Disabled safety policies for computer use. This field is not supported in Vertex AI.

    • build

      public abstract ComputerUse build()