38 instantiations of AIFunctionFactoryOptions
Microsoft.Extensions.AI.Abstractions (3)
Functions\AIFunctionFactory.cs (3)
38private static readonly AIFunctionFactoryOptions _defaultOptions = new(); 181: new() 349: new()
Microsoft.Extensions.AI.Abstractions.Tests (1)
Utilities\AIJsonUtilitiesTests.cs (1)
348new AIFunctionFactoryOptions
Microsoft.Extensions.AI.Integration.Tests (10)
ChatClientIntegrationTests.cs (10)
428AIFunctionFactoryOptions aiFuncOptions = new() 1420new AIFunctionFactoryOptions 1428new AIFunctionFactoryOptions 1436new AIFunctionFactoryOptions 1504new AIFunctionFactoryOptions 1512new AIFunctionFactoryOptions 1565new AIFunctionFactoryOptions 1637new AIFunctionFactoryOptions 1645new AIFunctionFactoryOptions 1653new AIFunctionFactoryOptions
Microsoft.Extensions.AI.OpenAI.Tests (2)
OpenAIResponseClientIntegrationTests.cs (2)
267Tools = [AIFunctionFactory.Create(() => { callCount++; return "5:43"; }, new AIFunctionFactoryOptions { Name = "GetCurrentTime" })] 361Tools = [AIFunctionFactory.Create(() => { callCount++; return "5:43"; }, new AIFunctionFactoryOptions { Name = "GetCurrentTime" })]
Microsoft.Extensions.AI.Tests (22)
Functions\AIFunctionFactoryTest.cs (22)
304func = AIFunctionFactory.Create(funcWithDisplayName, new AIFunctionFactoryOptions()); 308func = AIFunctionFactory.Create(funcWithDisplayName, new AIFunctionFactoryOptions { Name = "options_name" }); 324var options = new AIFunctionFactoryOptions 349AIFunctionFactoryOptions options = new(); 365new() 389new() 490new() { MarshalResult = (result, type, cancellationToken) => new ValueTask<object?>(result) }); 534new() 553new() 572new() 663new AIFunctionFactoryOptions 715new AIFunctionFactoryOptions 732new AIFunctionFactoryOptions 748new() 771new() 794new() 817new() 840new() 863new() 886new() 909new() 1160new AIFunctionFactoryOptions
46 references to AIFunctionFactoryOptions
Microsoft.Extensions.AI.Abstractions (40)
Functions\AIFunctionFactory.cs (39)
38private static readonly AIFunctionFactoryOptions _defaultOptions = new(); 60/// The handling of <see cref="IServiceProvider"/> parameters can be overridden via <see cref="AIFunctionFactoryOptions.ConfigureParameterBinding"/>. 68/// <see cref="AIFunctionFactoryOptions.ConfigureParameterBinding"/>. 72/// and are included in the generated JSON schema. This can be overridden by the <see cref="AIFunctionFactoryOptions.ConfigureParameterBinding"/> provided 77/// binding ignores this collection, but a custom binding supplied via <see cref="AIFunctionFactoryOptions.ConfigureParameterBinding"/> can choose to 83/// or <see cref="JsonNode"/>, it is deserialized into the parameter type, utilizing <see cref="AIFunctionFactoryOptions.SerializerOptions"/> if provided, 95/// <see cref="AIFunctionFactoryOptions.SerializerOptions"/> if provided, or else using <see cref="AIJsonUtilities.DefaultOptions"/>. 100/// <see cref="AIFunctionFactoryOptions.MarshalResult"/> is supplied, that delegate governs the behavior instead. 101/// Handling of return values can be overridden via <see cref="AIFunctionFactoryOptions.MarshalResult"/>. 106public static AIFunction Create(Delegate method, AIFunctionFactoryOptions? options) 179AIFunctionFactoryOptions createOptions = serializerOptions is null && name is null && description is null 218/// The handling of <see cref="IServiceProvider"/> parameters can be overridden via <see cref="AIFunctionFactoryOptions.ConfigureParameterBinding"/>. 226/// <see cref="AIFunctionFactoryOptions.ConfigureParameterBinding"/>. 230/// and are included in the generated JSON schema. This can be overridden by the <see cref="AIFunctionFactoryOptions.ConfigureParameterBinding"/> provided 235/// binding ignores this collection, but a custom binding supplied via <see cref="AIFunctionFactoryOptions.ConfigureParameterBinding"/> can choose to 241/// or <see cref="JsonNode"/>, it is deserialized into the parameter type, utilizing <see cref="AIFunctionFactoryOptions.SerializerOptions"/> if provided, 253/// <see cref="AIFunctionFactoryOptions.SerializerOptions"/> if provided, or else using <see cref="AIJsonUtilities.DefaultOptions"/>. 256/// Handling of return values can be overridden via <see cref="AIFunctionFactoryOptions.MarshalResult"/>. 264public static AIFunction Create(MethodInfo method, object? target, AIFunctionFactoryOptions? options) 347AIFunctionFactoryOptions createOptions = serializerOptions is null && name is null && description is null 375/// <see cref="AIFunctionFactoryOptions.SerializerOptions"/>. Arguments that are not already of the expected type are 377/// <see cref="AIFunctionFactoryOptions.SerializerOptions"/>. If the argument is a <see cref="JsonElement"/>, 396/// The handling of <see cref="IServiceProvider"/> parameters can be overridden via <see cref="AIFunctionFactoryOptions.ConfigureParameterBinding"/>. 404/// <see cref="AIFunctionFactoryOptions.ConfigureParameterBinding"/>. 408/// and are included in the generated JSON schema. This can be overridden by the <see cref="AIFunctionFactoryOptions.ConfigureParameterBinding"/> provided 413/// binding ignores this collection, but a custom binding supplied via <see cref="AIFunctionFactoryOptions.ConfigureParameterBinding"/> can choose to 419/// or <see cref="JsonNode"/>, it is deserialized into the parameter type, utilizing <see cref="AIFunctionFactoryOptions.SerializerOptions"/> if provided, 431/// <see cref="AIFunctionFactoryOptions.SerializerOptions"/> if provided, or else using <see cref="AIJsonUtilities.DefaultOptions"/>. 434/// Handling of return values can be overridden via <see cref="AIFunctionFactoryOptions.MarshalResult"/>. 446AIFunctionFactoryOptions? options = null) => 484public static ReflectionAIFunction Build(MethodInfo method, object? target, AIFunctionFactoryOptions options) 512AIFunctionFactoryOptions options) 530private ReflectionAIFunction(ReflectionAIFunctionDescriptor functionDescriptor, object? target, AIFunctionFactoryOptions options) 540AIFunctionFactoryOptions options) 623public static ReflectionAIFunctionDescriptor GetOrCreate(MethodInfo method, AIFunctionFactoryOptions options) 647Dictionary<ParameterInfo, AIFunctionFactoryOptions.ParameterBindingOptions>? boundParameters = null; 692if (boundParameters?.TryGetValue(parameters[i], out AIFunctionFactoryOptions.ParameterBindingOptions options) is not true) 781AIFunctionFactoryOptions.ParameterBindingOptions bindingOptions, 1131Func<ParameterInfo, AIFunctionFactoryOptions.ParameterBindingOptions>? GetBindParameterOptions,
Functions\AIFunctionFactoryOptions.cs (1)
20/// Initializes a new instance of the <see cref="AIFunctionFactoryOptions"/> class.
Microsoft.Extensions.AI.Integration.Tests (2)
ChatClientIntegrationTests.cs (2)
426Func<AIFunctionFactoryOptions> createOptions = () => 428AIFunctionFactoryOptions aiFuncOptions = new()
Microsoft.Extensions.AI.Tests (4)
Functions\AIFunctionFactoryTest.cs (4)
322Func<ParameterInfo, AIFunctionFactoryOptions.ParameterBindingOptions> getBindParameterMode = _ => default; 324var options = new AIFunctionFactoryOptions 349AIFunctionFactoryOptions options = new(); 1159private static AIFunctionFactoryOptions CreateKeyedServicesSupportOptions() =>