AIFunctionFactoryOptions.ConfigureParameterBinding 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 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
.