Condividi tramite


ToolDefinition Class

Definition

An abstract representation of an input tool definition that an assistant can use. Please note ToolDefinition is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. The available derived classes include CodeInterpreterToolDefinition, FunctionToolDefinition and RetrievalToolDefinition.

[System.ClientModel.Primitives.PersistableModelProxy(typeof(Azure.AI.OpenAI.Assistants.UnknownToolDefinition))]
public abstract class ToolDefinition : System.ClientModel.Primitives.IJsonModel<Azure.AI.OpenAI.Assistants.ToolDefinition>, System.ClientModel.Primitives.IPersistableModel<Azure.AI.OpenAI.Assistants.ToolDefinition>
[<System.ClientModel.Primitives.PersistableModelProxy(typeof(Azure.AI.OpenAI.Assistants.UnknownToolDefinition))>]
type ToolDefinition = class
    interface IJsonModel<ToolDefinition>
    interface IPersistableModel<ToolDefinition>
Public MustInherit Class ToolDefinition
Implements IJsonModel(Of ToolDefinition), IPersistableModel(Of ToolDefinition)
Inheritance
ToolDefinition
Derived
Attributes
Implements

Constructors

ToolDefinition()

Initializes a new instance of ToolDefinition.

Explicit Interface Implementations

IJsonModel<ToolDefinition>.Create(Utf8JsonReader, ModelReaderWriterOptions)

Reads one JSON value (including objects or arrays) from the provided reader and converts it to a model.

IJsonModel<ToolDefinition>.Write(Utf8JsonWriter, ModelReaderWriterOptions)

Writes the model to the provided Utf8JsonWriter.

IPersistableModel<ToolDefinition>.Create(BinaryData, ModelReaderWriterOptions)

Converts the provided BinaryData into a model.

IPersistableModel<ToolDefinition>.GetFormatFromOptions(ModelReaderWriterOptions)

Gets the data interchange format (JSON, Xml, etc) that the model uses when communicating with the service.

IPersistableModel<ToolDefinition>.Write(ModelReaderWriterOptions)

Writes the model into a BinaryData.

Applies to