38 instantiations of AIFunctionFactoryOptions
Microsoft.Extensions.AI.Abstractions (3)
Functions\AIFunctionFactory.cs (3)
38private static readonly AIFunctionFactoryOptions _defaultOptions = new(); 193: new() 373: new()
Microsoft.Extensions.AI.Abstractions.Tests (1)
Utilities\AIJsonUtilitiesTests.cs (1)
342new AIFunctionFactoryOptions
Microsoft.Extensions.AI.Integration.Tests (10)
ChatClientIntegrationTests.cs (10)
428AIFunctionFactoryOptions aiFuncOptions = new() 1419new AIFunctionFactoryOptions 1427new AIFunctionFactoryOptions 1435new AIFunctionFactoryOptions 1503new AIFunctionFactoryOptions 1511new AIFunctionFactoryOptions 1564new AIFunctionFactoryOptions 1636new AIFunctionFactoryOptions 1644new AIFunctionFactoryOptions 1652new AIFunctionFactoryOptions
Microsoft.Extensions.AI.OpenAI.Tests (2)
OpenAIResponseClientIntegrationTests.cs (2)
262Tools = [AIFunctionFactory.Create(() => { callCount++; return "5:43"; }, new AIFunctionFactoryOptions { Name = "GetCurrentTime" })] 356Tools = [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(); 63/// The handling of <see cref="IServiceProvider"/> parameters can be overridden via <see cref="AIFunctionFactoryOptions.ConfigureParameterBinding"/>. 73/// <see cref="AIFunctionFactoryOptions.ConfigureParameterBinding"/>. 78/// and are included in the generated JSON schema. This can be overridden by the <see cref="AIFunctionFactoryOptions.ConfigureParameterBinding"/> provided 83/// binding ignores this collection, but a custom binding supplied via <see cref="AIFunctionFactoryOptions.ConfigureParameterBinding"/> can choose to 89/// or <see cref="JsonNode"/>, it is deserialized into the parameter type, utilizing <see cref="AIFunctionFactoryOptions.SerializerOptions"/> if provided, 101/// <see cref="AIFunctionFactoryOptions.SerializerOptions"/> if provided, or else using <see cref="AIJsonUtilities.DefaultOptions"/>. 106/// <see cref="AIFunctionFactoryOptions.MarshalResult"/> is supplied, that delegate governs the behavior instead. 107/// Handling of return values can be overridden via <see cref="AIFunctionFactoryOptions.MarshalResult"/>. 112public static AIFunction Create(Delegate method, AIFunctionFactoryOptions? options) 191AIFunctionFactoryOptions createOptions = serializerOptions is null && name is null && description is null 233/// The handling of <see cref="IServiceProvider"/> parameters can be overridden via <see cref="AIFunctionFactoryOptions.ConfigureParameterBinding"/>. 243/// <see cref="AIFunctionFactoryOptions.ConfigureParameterBinding"/>. 248/// and are included in the generated JSON schema. This can be overridden by the <see cref="AIFunctionFactoryOptions.ConfigureParameterBinding"/> provided 253/// binding ignores this collection, but a custom binding supplied via <see cref="AIFunctionFactoryOptions.ConfigureParameterBinding"/> can choose to 259/// or <see cref="JsonNode"/>, it is deserialized into the parameter type, utilizing <see cref="AIFunctionFactoryOptions.SerializerOptions"/> if provided, 271/// <see cref="AIFunctionFactoryOptions.SerializerOptions"/> if provided, or else using <see cref="AIJsonUtilities.DefaultOptions"/>. 274/// Handling of return values can be overridden via <see cref="AIFunctionFactoryOptions.MarshalResult"/>. 282public static AIFunction Create(MethodInfo method, object? target, AIFunctionFactoryOptions? options) 371AIFunctionFactoryOptions createOptions = serializerOptions is null && name is null && description is null 399/// <see cref="AIFunctionFactoryOptions.SerializerOptions"/>. Arguments that are not already of the expected type are 401/// <see cref="AIFunctionFactoryOptions.SerializerOptions"/>. If the argument is a <see cref="JsonElement"/>, 423/// The handling of <see cref="IServiceProvider"/> parameters can be overridden via <see cref="AIFunctionFactoryOptions.ConfigureParameterBinding"/>. 433/// <see cref="AIFunctionFactoryOptions.ConfigureParameterBinding"/>. 438/// and are included in the generated JSON schema. This can be overridden by the <see cref="AIFunctionFactoryOptions.ConfigureParameterBinding"/> provided 443/// binding ignores this collection, but a custom binding supplied via <see cref="AIFunctionFactoryOptions.ConfigureParameterBinding"/> can choose to 449/// or <see cref="JsonNode"/>, it is deserialized into the parameter type, utilizing <see cref="AIFunctionFactoryOptions.SerializerOptions"/> if provided, 461/// <see cref="AIFunctionFactoryOptions.SerializerOptions"/> if provided, or else using <see cref="AIJsonUtilities.DefaultOptions"/>. 464/// Handling of return values can be overridden via <see cref="AIFunctionFactoryOptions.MarshalResult"/>. 476AIFunctionFactoryOptions? options = null) => 514public static ReflectionAIFunction Build(MethodInfo method, object? target, AIFunctionFactoryOptions options) 542AIFunctionFactoryOptions options) 560private ReflectionAIFunction(ReflectionAIFunctionDescriptor functionDescriptor, object? target, AIFunctionFactoryOptions options) 570AIFunctionFactoryOptions options) 653public static ReflectionAIFunctionDescriptor GetOrCreate(MethodInfo method, AIFunctionFactoryOptions options) 677Dictionary<ParameterInfo, AIFunctionFactoryOptions.ParameterBindingOptions>? boundParameters = null; 722if (boundParameters?.TryGetValue(parameters[i], out AIFunctionFactoryOptions.ParameterBindingOptions options) is not true) 811AIFunctionFactoryOptions.ParameterBindingOptions bindingOptions, 1161Func<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() =>