38 instantiations of AIFunctionFactoryOptions
Microsoft.Extensions.AI.Abstractions (3)
Functions\AIFunctionFactory.cs (3)
52private static readonly AIFunctionFactoryOptions _defaultOptions = new(); 208: new() 390: new()
Microsoft.Extensions.AI.Abstractions.Tests (1)
Utilities\AIJsonUtilitiesTests.cs (1)
348new AIFunctionFactoryOptions
Microsoft.Extensions.AI.Integration.Tests (1)
ChatClientIntegrationTests.cs (1)
418AIFunctionFactoryOptions aiFuncOptions = new()
Microsoft.Extensions.AI.OpenAI.Tests (2)
OpenAIResponseClientIntegrationTests.cs (2)
391Tools = [AIFunctionFactory.Create(() => { callCount++; return "5:43"; }, new AIFunctionFactoryOptions { Name = "GetCurrentTime" })] 485Tools = [AIFunctionFactory.Create(() => { callCount++; return "5:43"; }, new AIFunctionFactoryOptions { Name = "GetCurrentTime" })]
Microsoft.Extensions.AI.Tests (31)
Functions\AIFunctionFactoryTest.cs (31)
308func = AIFunctionFactory.Create(funcWithDisplayName, new AIFunctionFactoryOptions()); 312func = AIFunctionFactory.Create(funcWithDisplayName, new AIFunctionFactoryOptions { Name = "options_name" }); 335func = AIFunctionFactory.Create(funcWithAttribute, new AIFunctionFactoryOptions { Name = "options_name" }); 390new AIFunctionFactoryOptions { SerializerOptions = strictOptions }); 420new AIFunctionFactoryOptions { SerializerOptions = options }); 450var options = new AIFunctionFactoryOptions 494var options = new AIFunctionFactoryOptions 519AIFunctionFactoryOptions options = new(); 535new() 566AIFunctionFactoryOptions options = new() 620new() 721new() { MarshalResult = (result, type, cancellationToken) => new ValueTask<object?>(result) }); 765new() 784new() 803new() 894new AIFunctionFactoryOptions 946new AIFunctionFactoryOptions 963new AIFunctionFactoryOptions 979new() 1002new() 1025new() 1048new() 1071new() 1094new() 1117new() 1140new() 1391new AIFunctionFactoryOptions 1698new AIFunctionFactoryOptions { SerializerOptions = strictOptions }); 1744new AIFunctionFactoryOptions { SerializerOptions = strictOptions }); 1776new AIFunctionFactoryOptions { SerializerOptions = strictOptions }); 1799new AIFunctionFactoryOptions
62 references to AIFunctionFactoryOptions
Microsoft.Extensions.AI.Abstractions (52)
Functions\AIFunctionDeclaration.cs (2)
59/// <see cref="AIFunctionFactoryOptions.ExcludeResultSchema"/> to <see langword="true"/>. 64/// or a function for which <see cref="AIFunctionFactoryOptions.ExcludeResultSchema"/> was set to <see langword="true"/>.
Functions\AIFunctionFactory.cs (49)
37/// These schemas are produced using the <see cref="AIFunctionFactoryOptions.SerializerOptions"/> and 38/// <see cref="AIFunctionFactoryOptions.JsonSchemaCreateOptions"/>, and enable AI services to understand and 40/// via <see cref="AIFunctionFactoryOptions.MarshalResult"/> and <see cref="AIFunctionFactoryOptions.ExcludeResultSchema"/>, 52private static readonly AIFunctionFactoryOptions _defaultOptions = new(); 74/// The handling of <see cref="IServiceProvider"/> parameters can be overridden via <see cref="AIFunctionFactoryOptions.ConfigureParameterBinding"/>. 82/// <see cref="AIFunctionFactoryOptions.ConfigureParameterBinding"/>. 86/// and are included in the generated JSON schema. This can be overridden by the <see cref="AIFunctionFactoryOptions.ConfigureParameterBinding"/> provided 91/// binding ignores this collection, but a custom binding supplied via <see cref="AIFunctionFactoryOptions.ConfigureParameterBinding"/> can choose to 97/// or <see cref="JsonNode"/>, it is deserialized into the parameter type, utilizing <see cref="AIFunctionFactoryOptions.SerializerOptions"/> if provided, 109/// <see cref="AIFunctionFactoryOptions.SerializerOptions"/> if provided, or else using <see cref="AIJsonUtilities.DefaultOptions"/>. 114/// <see cref="AIFunctionFactoryOptions.MarshalResult"/> is supplied, that delegate governs the behavior instead. 121/// unwrapped result type. Return schema generation can be excluded via <see cref="AIFunctionFactoryOptions.ExcludeResultSchema"/>, 122/// and its generation is governed by <paramref name="options"/>'s <see cref="AIFunctionFactoryOptions.JsonSchemaCreateOptions"/>. 127public static AIFunction Create(Delegate method, AIFunctionFactoryOptions? options) 206AIFunctionFactoryOptions createOptions = serializerOptions is null && name is null && description is null 245/// The handling of <see cref="IServiceProvider"/> parameters can be overridden via <see cref="AIFunctionFactoryOptions.ConfigureParameterBinding"/>. 253/// <see cref="AIFunctionFactoryOptions.ConfigureParameterBinding"/>. 257/// and are included in the generated JSON schema. This can be overridden by the <see cref="AIFunctionFactoryOptions.ConfigureParameterBinding"/> provided 262/// binding ignores this collection, but a custom binding supplied via <see cref="AIFunctionFactoryOptions.ConfigureParameterBinding"/> can choose to 268/// or <see cref="JsonNode"/>, it is deserialized into the parameter type, utilizing <see cref="AIFunctionFactoryOptions.SerializerOptions"/> if provided, 280/// <see cref="AIFunctionFactoryOptions.SerializerOptions"/> if provided, or else using <see cref="AIJsonUtilities.DefaultOptions"/>. 283/// Handling of return values can be overridden via <see cref="AIFunctionFactoryOptions.MarshalResult"/>. 290/// unwrapped result type. Return schema generation can be excluded via <see cref="AIFunctionFactoryOptions.ExcludeResultSchema"/>, 291/// and its generation is governed by <paramref name="options"/>'s <see cref="AIFunctionFactoryOptions.JsonSchemaCreateOptions"/>. 299public static AIFunction Create(MethodInfo method, object? target, AIFunctionFactoryOptions? options) 388AIFunctionFactoryOptions createOptions = serializerOptions is null && name is null && description is null 416/// <see cref="AIFunctionFactoryOptions.SerializerOptions"/>. Arguments that are not already of the expected type are 418/// <see cref="AIFunctionFactoryOptions.SerializerOptions"/>. If the argument is a <see cref="JsonElement"/>, 437/// The handling of <see cref="IServiceProvider"/> parameters can be overridden via <see cref="AIFunctionFactoryOptions.ConfigureParameterBinding"/>. 445/// <see cref="AIFunctionFactoryOptions.ConfigureParameterBinding"/>. 449/// and are included in the generated JSON schema. This can be overridden by the <see cref="AIFunctionFactoryOptions.ConfigureParameterBinding"/> provided 454/// binding ignores this collection, but a custom binding supplied via <see cref="AIFunctionFactoryOptions.ConfigureParameterBinding"/> can choose to 460/// or <see cref="JsonNode"/>, it is deserialized into the parameter type, utilizing <see cref="AIFunctionFactoryOptions.SerializerOptions"/> if provided, 472/// <see cref="AIFunctionFactoryOptions.SerializerOptions"/> if provided, or else using <see cref="AIJsonUtilities.DefaultOptions"/>. 475/// Handling of return values can be overridden via <see cref="AIFunctionFactoryOptions.MarshalResult"/>. 482/// unwrapped result type. Return schema generation can be excluded via <see cref="AIFunctionFactoryOptions.ExcludeResultSchema"/>, 483/// and its generation is governed by <paramref name="options"/>'s <see cref="AIFunctionFactoryOptions.JsonSchemaCreateOptions"/>. 495AIFunctionFactoryOptions? options = null) => 533public static ReflectionAIFunction Build(MethodInfo method, object? target, AIFunctionFactoryOptions options) 561AIFunctionFactoryOptions options) 579private ReflectionAIFunction(ReflectionAIFunctionDescriptor functionDescriptor, object? target, AIFunctionFactoryOptions options) 589AIFunctionFactoryOptions options) 715public static ReflectionAIFunctionDescriptor GetOrCreate(MethodInfo method, AIFunctionFactoryOptions options) 743AIFunctionFactoryOptions.ParameterBindingOptions[]? boundParameters = null; 746boundParameters = new AIFunctionFactoryOptions.ParameterBindingOptions[parameters.Length]; 793AIFunctionFactoryOptions.ParameterBindingOptions options = 910AIFunctionFactoryOptions.ParameterBindingOptions bindingOptions, 1276Func<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)
416Func<AIFunctionFactoryOptions> createOptions = () => 418AIFunctionFactoryOptions aiFuncOptions = new()
Microsoft.Extensions.AI.Tests (8)
Functions\AIFunctionFactoryTest.cs (8)
450var options = new AIFunctionFactoryOptions 453? new AIFunctionFactoryOptions.ParameterBindingOptions { ExcludeFromSchema = true } 492Func<ParameterInfo, AIFunctionFactoryOptions.ParameterBindingOptions> getBindParameterMode = _ => default; 494var options = new AIFunctionFactoryOptions 519AIFunctionFactoryOptions options = new(); 566AIFunctionFactoryOptions options = new() 569? new AIFunctionFactoryOptions.ParameterBindingOptions 1390private static AIFunctionFactoryOptions CreateKeyedServicesSupportOptions() =>