38 instantiations of AIFunctionFactoryOptions
Microsoft.Extensions.AI.Abstractions (3)
Functions\AIFunctionFactory.cs (3)
38
private static readonly AIFunctionFactoryOptions _defaultOptions =
new
();
193
:
new
()
373
:
new
()
Microsoft.Extensions.AI.Abstractions.Tests (1)
Utilities\AIJsonUtilitiesTests.cs (1)
342
new
AIFunctionFactoryOptions
Microsoft.Extensions.AI.Integration.Tests (10)
ChatClientIntegrationTests.cs (10)
428
AIFunctionFactoryOptions aiFuncOptions =
new
()
1419
new
AIFunctionFactoryOptions
1427
new
AIFunctionFactoryOptions
1435
new
AIFunctionFactoryOptions
1503
new
AIFunctionFactoryOptions
1511
new
AIFunctionFactoryOptions
1564
new
AIFunctionFactoryOptions
1636
new
AIFunctionFactoryOptions
1644
new
AIFunctionFactoryOptions
1652
new
AIFunctionFactoryOptions
Microsoft.Extensions.AI.OpenAI.Tests (2)
OpenAIResponseClientIntegrationTests.cs (2)
262
Tools = [AIFunctionFactory.Create(() => { callCount++; return "5:43"; }, new
AIFunctionFactoryOptions
{ Name = "GetCurrentTime" })]
356
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();
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"/>.
112
public static AIFunction Create(Delegate method,
AIFunctionFactoryOptions
? options)
191
AIFunctionFactoryOptions
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"/>.
282
public static AIFunction Create(MethodInfo method, object? target,
AIFunctionFactoryOptions
? options)
371
AIFunctionFactoryOptions
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"/>.
476
AIFunctionFactoryOptions
? options = null) =>
514
public static ReflectionAIFunction Build(MethodInfo method, object? target,
AIFunctionFactoryOptions
options)
542
AIFunctionFactoryOptions
options)
560
private ReflectionAIFunction(ReflectionAIFunctionDescriptor functionDescriptor, object? target,
AIFunctionFactoryOptions
options)
570
AIFunctionFactoryOptions
options)
653
public static ReflectionAIFunctionDescriptor GetOrCreate(MethodInfo method,
AIFunctionFactoryOptions
options)
677
Dictionary<ParameterInfo,
AIFunctionFactoryOptions
.ParameterBindingOptions>? boundParameters = null;
722
if (boundParameters?.TryGetValue(parameters[i], out
AIFunctionFactoryOptions
.ParameterBindingOptions options) is not true)
811
AIFunctionFactoryOptions
.ParameterBindingOptions bindingOptions,
1161
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() =>