Table of Contents

Class ComputerUse

Namespace
Google.GenAI.Types
Assembly
Google.GenAI.dll

Tool to support computer use.

public record ComputerUse : IEquatable<ComputerUse>
Inheritance
ComputerUse
Implements
Inherited Members

Properties

DisabledSafetyPolicies

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

[JsonPropertyName("disabledSafetyPolicies")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public List<SafetyPolicy>? DisabledSafetyPolicies { get; set; }

Property Value

List<SafetyPolicy>

EnablePromptInjectionDetection

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

[JsonPropertyName("enablePromptInjectionDetection")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public bool? EnablePromptInjectionDetection { get; set; }

Property Value

bool?

Environment

The environment being operated.

[JsonPropertyName("environment")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public Environment? Environment { get; set; }

Property Value

Environment?

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.

[JsonPropertyName("excludedPredefinedFunctions")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public List<string>? ExcludedPredefinedFunctions { get; set; }

Property Value

List<string>

Methods

FromJson(string, JsonSerializerOptions?)

Deserializes a JSON string to a ComputerUse object.

public static ComputerUse? FromJson(string jsonString, JsonSerializerOptions? options = null)

Parameters

jsonString string

The JSON string to deserialize.

options JsonSerializerOptions

Optional JsonSerializerOptions.

Returns

ComputerUse

The deserialized ComputerUse object, or null if deserialization fails.