38 references to new
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