Table of Contents

Class ToolConfig

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

Tool config. This config is shared for all tools provided in the request.

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

Properties

FunctionCallingConfig

Optional. Function calling config.

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

Property Value

FunctionCallingConfig

IncludeServerSideToolInvocations

Optional. If true, the API response will include the server-side tool calls and responses within the Content message. This allows clients to observe the server's tool interactions. This field is not supported in Vertex AI.

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

Property Value

bool?

RetrievalConfig

Optional. Retrieval config.

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

Property Value

RetrievalConfig

Methods

FromJson(string, JsonSerializerOptions?)

Deserializes a JSON string to a ToolConfig object.

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

Parameters

jsonString string

The JSON string to deserialize.

options JsonSerializerOptions

Optional JsonSerializerOptions.

Returns

ToolConfig

The deserialized ToolConfig object, or null if deserialization fails.