Share via


AIFunctionFactoryOptions.ConfigureParameterBinding Property

Definition

Gets or sets a delegate used to determine how a particular parameter to the function should be bound.

public:
 property Func<System::Reflection::ParameterInfo ^, Microsoft::Extensions::AI::AIFunctionFactoryOptions::ParameterBindingOptions> ^ ConfigureParameterBinding { Func<System::Reflection::ParameterInfo ^, Microsoft::Extensions::AI::AIFunctionFactoryOptions::ParameterBindingOptions> ^ get(); void set(Func<System::Reflection::ParameterInfo ^, Microsoft::Extensions::AI::AIFunctionFactoryOptions::ParameterBindingOptions> ^ value); };
public Func<System.Reflection.ParameterInfo,Microsoft.Extensions.AI.AIFunctionFactoryOptions.ParameterBindingOptions>? ConfigureParameterBinding { get; set; }
member this.ConfigureParameterBinding : Func<System.Reflection.ParameterInfo, Microsoft.Extensions.AI.AIFunctionFactoryOptions.ParameterBindingOptions> with get, set
Public Property ConfigureParameterBinding As Func(Of ParameterInfo, AIFunctionFactoryOptions.ParameterBindingOptions)

Property Value

Remarks

If null, the default parameter binding logic will be used. If non-null value, this delegate will be invoked once for each parameter in the function as part of creating the AIFunction instance. It is not invoked for parameters of type CancellationToken, which are invariably bound to the token provided to the InvokeAsync(AIFunctionArguments, CancellationToken) invocation.

Returning a default AIFunctionFactoryOptions.ParameterBindingOptions results in the same behavior as if ConfigureParameterBinding is null.

Applies to