Share via


AIFunctionDeclaration Class

Definition

Represents a function that can be described to an AI service.

public ref class AIFunctionDeclaration abstract : Microsoft::Extensions::AI::AITool
public abstract class AIFunctionDeclaration : Microsoft.Extensions.AI.AITool
type AIFunctionDeclaration = class
    inherit AITool
Public MustInherit Class AIFunctionDeclaration
Inherits AITool
Inheritance
AIFunctionDeclaration
Derived

Remarks

AIFunctionDeclaration is the base class for AIFunction, which adds the ability to invoke the function. Components may type test AITool instances for AIFunctionDeclaration to determine whether they can be described as functions, and may type test for AIFunction to determine whether they can be invoked.

Constructors

AIFunctionDeclaration()

Initializes a new instance of the AIFunctionDeclaration class.

Properties

AdditionalProperties

Gets any additional properties associated with the tool.

(Inherited from AITool)
Description

Gets a description of the tool, suitable for use in describing the purpose to a model.

(Inherited from AITool)
JsonSchema

Gets a JSON Schema describing the function and its input parameters.

Name

Gets the name of the tool.

(Inherited from AITool)
ReturnJsonSchema

Gets a JSON Schema describing the function's return value.

Methods

ToString()

Returns a string that represents the current object.

(Inherited from AITool)

Extension Methods

AsOpenAIAssistantsFunctionToolDefinition(AIFunctionDeclaration)

Creates an OpenAI FunctionToolDefinition from an AIFunctionDeclaration.

AsOpenAIChatTool(AIFunctionDeclaration)

Creates an OpenAI ChatTool from an AIFunctionDeclaration.

AsOpenAIConversationFunctionTool(AIFunctionDeclaration)

Creates an OpenAI ConversationFunctionTool from an AIFunctionDeclaration.

AsOpenAIResponseTool(AIFunctionDeclaration)

Creates an OpenAI ResponseTool from an AIFunctionDeclaration.

Applies to