Class ComputerUse

java.lang.Object
com.google.genai.JsonSerializable
com.google.genai.types.ComputerUse

public abstract class ComputerUse extends JsonSerializable
A tool that enables the model to interact directly with a computer environment.
  • Constructor Details

    • ComputerUse

      public ComputerUse()
  • Method Details

    • environment

      public abstract Optional<Environment> environment()
      Required. The target environment where the computer use tool operates.
    • excludedPredefinedFunctions

      public abstract Optional<List<String>> excludedPredefinedFunctions()
      Optional. A list of predefined functions to explicitly exclude from the model call. By default, [predefined functions](https://cloud.google.com/vertex-ai/generative-ai/docs/computer-use#supported-actions) are included. Excluding functions allows for a more restricted action space or custom definitions for predefined functions.
    • enablePromptInjectionDetection

      public abstract Optional<Boolean> enablePromptInjectionDetection()
      Optional. Whether to enable the prompt injection detection check on the computer use request.
    • disabledSafetyPolicies

      public abstract Optional<List<SafetyPolicy>> disabledSafetyPolicies()
      Optional. A list of safety policies to disable for the computer use tool.
    • builder

      public static ComputerUse.Builder builder()
      Instantiates a builder for ComputerUse.
    • toBuilder

      public abstract ComputerUse.Builder toBuilder()
      Creates a builder with the same values as this instance.
    • fromJson

      public static ComputerUse fromJson(String jsonString)
      Deserializes a JSON string to a ComputerUse object.