FunctionTool Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Defines a function in your own code the model can choose to call. Learn more about function calling.
public class FunctionTool : Azure.AI.AgentServer.Contracts.Generated.OpenAI.Tool, System.ClientModel.Primitives.IJsonModel<Azure.AI.AgentServer.Contracts.Generated.OpenAI.FunctionTool>, System.ClientModel.Primitives.IPersistableModel<Azure.AI.AgentServer.Contracts.Generated.OpenAI.FunctionTool>
type FunctionTool = class
inherit Tool
interface IUtf8JsonSerializable
interface IJsonModel<FunctionTool>
interface IPersistableModel<FunctionTool>
Public Class FunctionTool
Inherits Tool
Implements IJsonModel(Of FunctionTool), IPersistableModel(Of FunctionTool)
- Inheritance
- Implements
Constructors
| Name | Description |
|---|---|
| FunctionTool() |
Initializes a new instance of FunctionTool for deserialization. |
| FunctionTool(String, BinaryData, Nullable<Boolean>) |
Initializes a new instance of FunctionTool. |
| FunctionTool(ToolType, IDictionary<String,BinaryData>, String, String, BinaryData, Nullable<Boolean>) |
Initializes a new instance of FunctionTool. |
Properties
| Name | Description |
|---|---|
| Description |
A description of the function. Used by the model to determine whether or not to call the function. |
| Name |
The name of the function to call. |
| Parameters |
A JSON schema object describing the parameters of the function. 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:
|
| Strict |
Whether to enforce strict parameter validation. Default |
| Type |
Gets or sets the type. (Inherited from Tool) |
Methods
| Name | Description |
|---|---|
| DeserializeFunctionTool(JsonElement, ModelReaderWriterOptions) | |
| FromResponse(Response) |
Deserializes the model from a raw response. |
| JsonModelWriteCore(Utf8JsonWriter, ModelReaderWriterOptions) | |
| ToRequestContent() |
Convert into a RequestContent. |