38 instantiations of AIFunctionFactoryOptions
Microsoft.Extensions.AI.Abstractions (3)
Functions\AIFunctionFactory.cs (3)
38
private static readonly AIFunctionFactoryOptions _defaultOptions =
new
();
181
:
new
()
349
:
new
()
Microsoft.Extensions.AI.Abstractions.Tests (1)
Utilities\AIJsonUtilitiesTests.cs (1)
348
new
AIFunctionFactoryOptions
Microsoft.Extensions.AI.Integration.Tests (10)
ChatClientIntegrationTests.cs (10)
428
AIFunctionFactoryOptions aiFuncOptions =
new
()
1420
new
AIFunctionFactoryOptions
1428
new
AIFunctionFactoryOptions
1436
new
AIFunctionFactoryOptions
1504
new
AIFunctionFactoryOptions
1512
new
AIFunctionFactoryOptions
1565
new
AIFunctionFactoryOptions
1637
new
AIFunctionFactoryOptions
1645
new
AIFunctionFactoryOptions
1653
new
AIFunctionFactoryOptions
Microsoft.Extensions.AI.OpenAI.Tests (2)
OpenAIResponseClientIntegrationTests.cs (2)
267
Tools = [AIFunctionFactory.Create(() => { callCount++; return "5:43"; }, new
AIFunctionFactoryOptions
{ Name = "GetCurrentTime" })]
361
Tools = [AIFunctionFactory.Create(() => { callCount++; return "5:43"; }, new
AIFunctionFactoryOptions
{ Name = "GetCurrentTime" })]
Microsoft.Extensions.AI.Tests (22)
Functions\AIFunctionFactoryTest.cs (22)
304
func = AIFunctionFactory.Create(funcWithDisplayName, new
AIFunctionFactoryOptions
());
308
func = AIFunctionFactory.Create(funcWithDisplayName, new
AIFunctionFactoryOptions
{ Name = "options_name" });
324
var options = new
AIFunctionFactoryOptions
349
AIFunctionFactoryOptions options =
new
();
365
new
()
389
new
()
490
new
() { MarshalResult = (result, type, cancellationToken) => new ValueTask<object?>(result) });
534
new
()
553
new
()
572
new
()
663
new
AIFunctionFactoryOptions
715
new
AIFunctionFactoryOptions
732
new
AIFunctionFactoryOptions
748
new
()
771
new
()
794
new
()
817
new
()
840
new
()
863
new
()
886
new
()
909
new
()
1160
new
AIFunctionFactoryOptions
46 references to AIFunctionFactoryOptions
Microsoft.Extensions.AI.Abstractions (40)
Functions\AIFunctionFactory.cs (39)
38
private 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"/>.
106
public static AIFunction Create(Delegate method,
AIFunctionFactoryOptions
? options)
179
AIFunctionFactoryOptions
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"/>.
264
public static AIFunction Create(MethodInfo method, object? target,
AIFunctionFactoryOptions
? options)
347
AIFunctionFactoryOptions
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"/>.
446
AIFunctionFactoryOptions
? options = null) =>
484
public static ReflectionAIFunction Build(MethodInfo method, object? target,
AIFunctionFactoryOptions
options)
512
AIFunctionFactoryOptions
options)
530
private ReflectionAIFunction(ReflectionAIFunctionDescriptor functionDescriptor, object? target,
AIFunctionFactoryOptions
options)
540
AIFunctionFactoryOptions
options)
623
public static ReflectionAIFunctionDescriptor GetOrCreate(MethodInfo method,
AIFunctionFactoryOptions
options)
647
Dictionary<ParameterInfo,
AIFunctionFactoryOptions
.ParameterBindingOptions>? boundParameters = null;
692
if (boundParameters?.TryGetValue(parameters[i], out
AIFunctionFactoryOptions
.ParameterBindingOptions options) is not true)
781
AIFunctionFactoryOptions
.ParameterBindingOptions bindingOptions,
1131
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)
426
Func<
AIFunctionFactoryOptions
> createOptions = () =>
428
AIFunctionFactoryOptions
aiFuncOptions = new()
Microsoft.Extensions.AI.Tests (4)
Functions\AIFunctionFactoryTest.cs (4)
322
Func<ParameterInfo,
AIFunctionFactoryOptions
.ParameterBindingOptions> getBindParameterMode = _ => default;
324
var
options = new AIFunctionFactoryOptions
349
AIFunctionFactoryOptions
options = new();
1159
private static
AIFunctionFactoryOptions
CreateKeyedServicesSupportOptions() =>