FunctionInvokingChatClient.FunctionInvoker Property
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.
Gets or sets a delegate used to invoke AIFunction instances.
public:
property Func<Microsoft::Extensions::AI::FunctionInvocationContext ^, System::Threading::CancellationToken, System::Threading::Tasks::ValueTask<System::Object ^>> ^ FunctionInvoker { Func<Microsoft::Extensions::AI::FunctionInvocationContext ^, System::Threading::CancellationToken, System::Threading::Tasks::ValueTask<System::Object ^>> ^ get(); void set(Func<Microsoft::Extensions::AI::FunctionInvocationContext ^, System::Threading::CancellationToken, System::Threading::Tasks::ValueTask<System::Object ^>> ^ value); };
public Func<Microsoft.Extensions.AI.FunctionInvocationContext,System.Threading.CancellationToken,System.Threading.Tasks.ValueTask<object?>>? FunctionInvoker { get; set; }
member this.FunctionInvoker : Func<Microsoft.Extensions.AI.FunctionInvocationContext, System.Threading.CancellationToken, System.Threading.Tasks.ValueTask<obj>> with get, set
Public Property FunctionInvoker As Func(Of FunctionInvocationContext, CancellationToken, ValueTask(Of Object))
Property Value
Remarks
By default, the protected InvokeFunctionAsync(FunctionInvocationContext, CancellationToken) method is called for each AIFunction to be invoked, invoking the instance and returning its result. If this delegate is set to a non-null
value, InvokeFunctionAsync(FunctionInvocationContext, CancellationToken) will replace its normal invocation with a call to this delegate, enabling this delegate to assume all invocation handling of the function.