Table of Contents

Class ToolCodeExecution

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

Tool that executes code generated by the model, and automatically returns the result to the model. See also ExecutableCode and CodeExecutionResult, which are input and output to this tool. This data type is not supported in Gemini API.

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

Methods

FromJson(string, JsonSerializerOptions?)

Deserializes a JSON string to a ToolCodeExecution object.

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

Parameters

jsonString string

The JSON string to deserialize.

options JsonSerializerOptions

Optional JsonSerializerOptions.

Returns

ToolCodeExecution

The deserialized ToolCodeExecution object, or null if deserialization fails.