20 instantiations of AIFunctionParameterMetadata
Microsoft.Extensions.AI (1)
Functions\AIFunctionFactory.cs (1)
415return new AIFunctionParameterMetadata(parameter.Name)
Microsoft.Extensions.AI.Abstractions.Tests (18)
Contents\FunctionCallContentTests..cs (6)
259new AIFunctionParameterMetadata("a"), 260new AIFunctionParameterMetadata("b"), 261new AIFunctionParameterMetadata("c"), 262new AIFunctionParameterMetadata("d"), 263new AIFunctionParameterMetadata("e"), 264new AIFunctionParameterMetadata("f"),
Functions\AIFunctionMetadataTests.cs (4)
44Parameters = [new AIFunctionParameterMetadata("param")], 86new AIFunctionParameterMetadata("param0"), 87new AIFunctionParameterMetadata("param1"), 88new AIFunctionParameterMetadata("param2"),
Functions\AIFunctionParameterMetadataTests.cs (8)
15Assert.Throws<ArgumentNullException>("name", () => new AIFunctionParameterMetadata((string)null!)); 16Assert.Throws<ArgumentException>("name", () => new AIFunctionParameterMetadata(" ")); 17Assert.Throws<ArgumentNullException>("metadata", () => new AIFunctionParameterMetadata((AIFunctionParameterMetadata)null!)); 23AIFunctionParameterMetadata p = new("name"); 35AIFunctionParameterMetadata p1 = new("name") 45AIFunctionParameterMetadata p2 = new(p1); 58AIFunctionParameterMetadata p1 = new("name") 68AIFunctionParameterMetadata p2 = new(p1)
Microsoft.Extensions.AI.Tests (1)
Functions\AIFunctionFactoryTest.cs (1)
158IReadOnlyList<AIFunctionParameterMetadata> parameterMetadata = [new AIFunctionParameterMetadata("a")];
29 references to AIFunctionParameterMetadata
Microsoft.Extensions.AI (4)
Functions\AIFunctionFactory.cs (3)
248List<AIFunctionParameterMetadata>? parameterMetadata = options.Parameters is not null ? null : []; 256if (GetParameterMarshaller(options, parameters[i], ref sawAIContextParameter, out _parameterMarshallers[i]) is AIFunctionParameterMetadata parameterView) 338private static AIFunctionParameterMetadata? GetParameterMarshaller(
Functions\AIFunctionFactoryCreateOptions.cs (1)
61public IReadOnlyList<AIFunctionParameterMetadata>? Parameters { get; set; }
Microsoft.Extensions.AI.Abstractions (13)
Functions\AIFunctionMetadata.cs (8)
26private IReadOnlyList<AIFunctionParameterMetadata> _parameters = []; 35private Dictionary<string, AIFunctionParameterMetadata>? _parametersByName; 77public IReadOnlyList<AIFunctionParameterMetadata> Parameters 83/// <summary>Gets the <see cref="AIFunctionParameterMetadata"/> for a parameter by its name.</summary> 85/// <returns>The corresponding <see cref="AIFunctionParameterMetadata"/>, if found; otherwise, null.</returns> 86public AIFunctionParameterMetadata? GetParameter(string name) 88Dictionary<string, AIFunctionParameterMetadata>? parametersByName = _parametersByName ??= _parameters.ToDictionary(p => p.Name); 90return parametersByName.TryGetValue(name, out AIFunctionParameterMetadata? parameter) ?
Functions\AIFunctionParameterMetadata.cs (4)
16/// <summary>Initializes a new instance of the <see cref="AIFunctionParameterMetadata"/> class for a parameter with the specified name.</summary> 25/// <summary>Initializes a new instance of the <see cref="AIFunctionParameterMetadata"/> class as a copy of another <see cref="AIFunctionParameterMetadata"/>.</summary> 28public AIFunctionParameterMetadata(AIFunctionParameterMetadata metadata)
Utilities\AIJsonUtilities.Schema.cs (1)
58AIFunctionParameterMetadata parameterMetadata,
Microsoft.Extensions.AI.Abstractions.Tests (8)
Functions\AIFunctionParameterMetadataTests.cs (6)
17Assert.Throws<ArgumentNullException>("metadata", () => new AIFunctionParameterMetadata((AIFunctionParameterMetadata)null!)); 23AIFunctionParameterMetadata p = new("name"); 35AIFunctionParameterMetadata p1 = new("name") 45AIFunctionParameterMetadata p2 = new(p1); 58AIFunctionParameterMetadata p1 = new("name") 68AIFunctionParameterMetadata p2 = new(p1)
Utilities\AIJsonUtilitiesTests.cs (2)
219AIFunctionParameterMetadata param = metadata.Parameters[0]; 240foreach (var param in metadata.Parameters)
Microsoft.Extensions.AI.AzureAIInference (1)
AzureAIInferenceChatClient.cs (1)
384foreach (AIFunctionParameterMetadata parameter in parameters)
Microsoft.Extensions.AI.OpenAI (2)
OpenAIChatClient.cs (1)
505foreach (AIFunctionParameterMetadata parameter in parameters)
OpenAIRealtimeExtensions.cs (1)
98private static JsonElement GetParameterSchema(AIFunctionParameterMetadata parameterMetadata)
Microsoft.Extensions.AI.Tests (1)
Functions\AIFunctionFactoryTest.cs (1)
158IReadOnlyList<AIFunctionParameterMetadata> parameterMetadata = [new AIFunctionParameterMetadata("a")];