Condividi tramite


AzureFunctionToolDefinition Class

Definition

The input definition information for a azure function tool as used to configure an agent.

public class AzureFunctionToolDefinition : Azure.AI.Projects.ToolDefinition, System.ClientModel.Primitives.IJsonModel<Azure.AI.Projects.AzureFunctionToolDefinition>, System.ClientModel.Primitives.IPersistableModel<Azure.AI.Projects.AzureFunctionToolDefinition>
type AzureFunctionToolDefinition = class
    inherit ToolDefinition
    interface IJsonModel<AzureFunctionToolDefinition>
    interface IPersistableModel<AzureFunctionToolDefinition>
Public Class AzureFunctionToolDefinition
Inherits ToolDefinition
Implements IJsonModel(Of AzureFunctionToolDefinition), IPersistableModel(Of AzureFunctionToolDefinition)
Inheritance
AzureFunctionToolDefinition
Implements

Constructors

AzureFunctionToolDefinition(String, String, AzureFunctionBinding, AzureFunctionBinding, BinaryData)

Initializes a new instance of AzureFunctionDefinition.

Properties

Description

A description of what the function does, used by the model to choose when and how to call the function.

Name

The name of the function to be called.

Parameters

The parameters the functions accepts, described as a JSON Schema object.

To assign an object to this property use FromObjectAsJson<T>(T, JsonSerializerOptions).

To assign an already formatted json string to this property use FromString(String).

Examples:

  • BinaryData.FromObjectAsJson("foo"): Creates a payload of "foo".
  • BinaryData.FromString("\"foo\""): Creates a payload of "foo".
  • BinaryData.FromObjectAsJson(new { key = "value" }): Creates a payload of { "key": "value" }.
  • BinaryData.FromString("{\"key\": \"value\"}"): Creates a payload of { "key": "value" }.

Methods

Equals(Object)

Determines whether the specified object is equal to the current object.

GetHashCode()

Serves as the default hash function.

JsonModelWriteCore(Utf8JsonWriter, ModelReaderWriterOptions)

Explicit Interface Implementations

IJsonModel<AzureFunctionToolDefinition>.Create(Utf8JsonReader, ModelReaderWriterOptions)

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

IJsonModel<AzureFunctionToolDefinition>.Write(Utf8JsonWriter, ModelReaderWriterOptions)

Writes the model to the provided Utf8JsonWriter.

IJsonModel<ToolDefinition>.Create(Utf8JsonReader, ModelReaderWriterOptions)

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

(Inherited from ToolDefinition)
IJsonModel<ToolDefinition>.Write(Utf8JsonWriter, ModelReaderWriterOptions)

Writes the model to the provided Utf8JsonWriter.

(Inherited from ToolDefinition)
IPersistableModel<AzureFunctionToolDefinition>.Create(BinaryData, ModelReaderWriterOptions)

Converts the provided BinaryData into a model.

IPersistableModel<AzureFunctionToolDefinition>.GetFormatFromOptions(ModelReaderWriterOptions)

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

IPersistableModel<AzureFunctionToolDefinition>.Write(ModelReaderWriterOptions)

Writes the model into a BinaryData.

IPersistableModel<ToolDefinition>.Create(BinaryData, ModelReaderWriterOptions)

Converts the provided BinaryData into a model.

(Inherited from ToolDefinition)
IPersistableModel<ToolDefinition>.GetFormatFromOptions(ModelReaderWriterOptions)

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

(Inherited from ToolDefinition)
IPersistableModel<ToolDefinition>.Write(ModelReaderWriterOptions)

Writes the model into a BinaryData.

(Inherited from ToolDefinition)

Applies to