Share via


FunctionTool Class

Definition

Function.

public class FunctionTool : Azure.AI.AgentServer.Responses.Models.Tool, System.ClientModel.Primitives.IJsonModel<Azure.AI.AgentServer.Responses.Models.FunctionTool>, System.ClientModel.Primitives.IPersistableModel<Azure.AI.AgentServer.Responses.Models.FunctionTool>
type FunctionTool = class
    inherit Tool
    interface IJsonModel<FunctionTool>
    interface IPersistableModel<FunctionTool>
Public Class FunctionTool
Inherits Tool
Implements IJsonModel(Of FunctionTool), IPersistableModel(Of FunctionTool)
Inheritance
FunctionTool
Implements

Constructors

Name Description
FunctionTool(String, IDictionary<String,BinaryData>, Nullable<Boolean>)

Initializes a new instance of FunctionTool.

Properties

Name Description
Description

Gets or sets the Description.

Name

The name of the function to call.

Parameters

Gets or sets the Parameters.

To assign an object to the value of 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" }.

Strict

Gets or sets the Strict.

Methods

Name Description
JsonModelCreateCore(Utf8JsonReader, ModelReaderWriterOptions)
JsonModelWriteCore(Utf8JsonWriter, ModelReaderWriterOptions)
PersistableModelCreateCore(BinaryData, ModelReaderWriterOptions)
PersistableModelWriteCore(ModelReaderWriterOptions)

Explicit Interface Implementations

Name Description
IJsonModel<FunctionTool>.Create(Utf8JsonReader, ModelReaderWriterOptions)
IJsonModel<FunctionTool>.Write(Utf8JsonWriter, ModelReaderWriterOptions)
IJsonModel<Tool>.Create(Utf8JsonReader, ModelReaderWriterOptions) (Inherited from Tool)
IJsonModel<Tool>.Write(Utf8JsonWriter, ModelReaderWriterOptions) (Inherited from Tool)
IPersistableModel<FunctionTool>.Create(BinaryData, ModelReaderWriterOptions)
IPersistableModel<FunctionTool>.GetFormatFromOptions(ModelReaderWriterOptions)
IPersistableModel<FunctionTool>.Write(ModelReaderWriterOptions)
IPersistableModel<Tool>.Create(BinaryData, ModelReaderWriterOptions) (Inherited from Tool)
IPersistableModel<Tool>.GetFormatFromOptions(ModelReaderWriterOptions) (Inherited from Tool)
IPersistableModel<Tool>.Write(ModelReaderWriterOptions) (Inherited from Tool)

Applies to