38 instantiations of AIFunctionFactoryOptions
Microsoft.Extensions.AI.Abstractions (3)
Functions\AIFunctionFactory.cs (3)
52
private static readonly AIFunctionFactoryOptions _defaultOptions =
new
();
208
:
new
()
390
:
new
()
Microsoft.Extensions.AI.Abstractions.Tests (1)
Utilities\AIJsonUtilitiesTests.cs (1)
348
new
AIFunctionFactoryOptions
Microsoft.Extensions.AI.Integration.Tests (1)
ChatClientIntegrationTests.cs (1)
418
AIFunctionFactoryOptions aiFuncOptions =
new
()
Microsoft.Extensions.AI.OpenAI.Tests (2)
OpenAIResponseClientIntegrationTests.cs (2)
391
Tools = [AIFunctionFactory.Create(() => { callCount++; return "5:43"; }, new
AIFunctionFactoryOptions
{ Name = "GetCurrentTime" })]
485
Tools = [AIFunctionFactory.Create(() => { callCount++; return "5:43"; }, new
AIFunctionFactoryOptions
{ Name = "GetCurrentTime" })]
Microsoft.Extensions.AI.Tests (31)
Functions\AIFunctionFactoryTest.cs (31)
308
func = AIFunctionFactory.Create(funcWithDisplayName, new
AIFunctionFactoryOptions
());
312
func = AIFunctionFactory.Create(funcWithDisplayName, new
AIFunctionFactoryOptions
{ Name = "options_name" });
335
func = AIFunctionFactory.Create(funcWithAttribute, new
AIFunctionFactoryOptions
{ Name = "options_name" });
390
new
AIFunctionFactoryOptions
{ SerializerOptions = strictOptions });
420
new
AIFunctionFactoryOptions
{ SerializerOptions = options });
450
var options = new
AIFunctionFactoryOptions
494
var options = new
AIFunctionFactoryOptions
519
AIFunctionFactoryOptions options =
new
();
535
new
()
566
AIFunctionFactoryOptions options =
new
()
620
new
()
721
new
() { MarshalResult = (result, type, cancellationToken) => new ValueTask<object?>(result) });
765
new
()
784
new
()
803
new
()
894
new
AIFunctionFactoryOptions
946
new
AIFunctionFactoryOptions
963
new
AIFunctionFactoryOptions
979
new
()
1002
new
()
1025
new
()
1048
new
()
1071
new
()
1094
new
()
1117
new
()
1140
new
()
1391
new
AIFunctionFactoryOptions
1698
new
AIFunctionFactoryOptions
{ SerializerOptions = strictOptions });
1744
new
AIFunctionFactoryOptions
{ SerializerOptions = strictOptions });
1776
new
AIFunctionFactoryOptions
{ SerializerOptions = strictOptions });
1799
new
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"/>,
52
private 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"/>.
127
public static AIFunction Create(Delegate method,
AIFunctionFactoryOptions
? options)
206
AIFunctionFactoryOptions
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"/>.
299
public static AIFunction Create(MethodInfo method, object? target,
AIFunctionFactoryOptions
? options)
388
AIFunctionFactoryOptions
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"/>.
495
AIFunctionFactoryOptions
? options = null) =>
533
public static ReflectionAIFunction Build(MethodInfo method, object? target,
AIFunctionFactoryOptions
options)
561
AIFunctionFactoryOptions
options)
579
private ReflectionAIFunction(ReflectionAIFunctionDescriptor functionDescriptor, object? target,
AIFunctionFactoryOptions
options)
589
AIFunctionFactoryOptions
options)
715
public static ReflectionAIFunctionDescriptor GetOrCreate(MethodInfo method,
AIFunctionFactoryOptions
options)
743
AIFunctionFactoryOptions
.ParameterBindingOptions[]? boundParameters = null;
746
boundParameters = new
AIFunctionFactoryOptions
.ParameterBindingOptions[parameters.Length];
793
AIFunctionFactoryOptions
.ParameterBindingOptions options =
910
AIFunctionFactoryOptions
.ParameterBindingOptions bindingOptions,
1276
Func<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)
416
Func<
AIFunctionFactoryOptions
> createOptions = () =>
418
AIFunctionFactoryOptions
aiFuncOptions = new()
Microsoft.Extensions.AI.Tests (8)
Functions\AIFunctionFactoryTest.cs (8)
450
var
options = new AIFunctionFactoryOptions
453
? new
AIFunctionFactoryOptions
.ParameterBindingOptions { ExcludeFromSchema = true }
492
Func<ParameterInfo,
AIFunctionFactoryOptions
.ParameterBindingOptions> getBindParameterMode = _ => default;
494
var
options = new AIFunctionFactoryOptions
519
AIFunctionFactoryOptions
options = new();
566
AIFunctionFactoryOptions
options = new()
569
? new
AIFunctionFactoryOptions
.ParameterBindingOptions
1390
private static
AIFunctionFactoryOptions
CreateKeyedServicesSupportOptions() =>