Share via


DelegatingAIFunction Class

Definition

Provides an optional base class for an AIFunction that passes through calls to another instance.

public ref class DelegatingAIFunction : Microsoft::Extensions::AI::AIFunction
public class DelegatingAIFunction : Microsoft.Extensions.AI.AIFunction
type DelegatingAIFunction = class
    inherit AIFunction
Public Class DelegatingAIFunction
Inherits AIFunction
Inheritance
DelegatingAIFunction

Constructors

DelegatingAIFunction(AIFunction)

Initializes a new instance of the DelegatingAIFunction class as a wrapper around innerFunction.

Properties

AdditionalProperties

Gets any additional properties associated with the tool.

Description

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

InnerFunction

Gets the inner AIFunction.

JsonSchema

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

JsonSerializerOptions

Gets a JsonSerializerOptions that can be used to marshal function parameters.

Name

Gets the name of the tool.

ReturnJsonSchema

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

UnderlyingMethod

Gets the underlying MethodInfo that this AIFunction might be wrapping.

Methods

InvokeAsync(AIFunctionArguments, CancellationToken)

Invokes the AIFunction and returns its result.

(Inherited from AIFunction)
InvokeCoreAsync(AIFunctionArguments, CancellationToken)

Invokes the AIFunction and returns its result.

ToString()

Returns a string that represents the current object.

Extension Methods

AsOpenAIAssistantsFunctionToolDefinition(AIFunction)

Creates an OpenAI FunctionToolDefinition from an AIFunction.

AsOpenAIChatTool(AIFunction)

Creates an OpenAI ChatTool from an AIFunction.

AsOpenAIConversationFunctionTool(AIFunction)

Creates an OpenAI ConversationFunctionTool from an AIFunction.

AsOpenAIResponseTool(AIFunction)

Creates an OpenAI ResponseTool from an AIFunction.

Applies to