19 instantiations of AIFunctionMetadata
Microsoft.Extensions.AI (1)
Functions\AIFunctionFactory.cs (1)
268Metadata = new AIFunctionMetadata(functionName)
Microsoft.Extensions.AI.Abstractions.Tests (18)
Contents\FunctionCallContentTests..cs (1)
254public override AIFunctionMetadata Metadata => new("NetTypeless")
Functions\AIFunctionMetadataTests.cs (14)
15Assert.Throws<ArgumentNullException>("name", () => new AIFunctionMetadata((string)null!)); 16Assert.Throws<ArgumentException>("name", () => new AIFunctionMetadata(" \t ")); 17Assert.Throws<ArgumentNullException>("metadata", () => new AIFunctionMetadata((AIFunctionMetadata)null!)); 23AIFunctionMetadata f = new("name"); 35Assert.Same(f.AdditionalProperties, new AIFunctionMetadata("name2").AdditionalProperties); 41AIFunctionMetadata f1 = new("name") 49AIFunctionMetadata f2 = new(f1); 60Assert.Throws<ArgumentNullException>("value", () => new AIFunctionMetadata("name") { Name = null! }); 61Assert.Throws<ArgumentNullException>("value", () => new AIFunctionMetadata("name") { Parameters = null! }); 62Assert.Throws<ArgumentNullException>("value", () => new AIFunctionMetadata("name") { ReturnParameter = null! }); 63Assert.Throws<ArgumentNullException>("value", () => new AIFunctionMetadata("name") { AdditionalProperties = null! }); 69AIFunctionMetadata f = new("name") { Description = null }; 76Assert.Null(new AIFunctionMetadata("name").GetParameter("test")); 82AIFunctionMetadata f = new("name")
Functions\AIFunctionParameterMetadataTests.cs (2)
88Assert.Throws<ArgumentNullException>("value", () => new AIFunctionMetadata("name") { Name = null! }); 89Assert.Throws<ArgumentException>("value", () => new AIFunctionMetadata("name") { Name = "\r\n\t " });
Functions\AIFunctionTests.cs (1)
38public override AIFunctionMetadata Metadata => new("name");
18 references to AIFunctionMetadata
Microsoft.Extensions.AI (2)
Functions\AIFunctionFactory.cs (1)
284public override AIFunctionMetadata Metadata { get; }
Functions\AIFunctionFactoryCreateOptions.cs (1)
70/// Gets or sets additional values to store on the resulting <see cref="AIFunctionMetadata.AdditionalProperties" /> property.
Microsoft.Extensions.AI.Abstractions (6)
Functions\AIFunction.cs (1)
17public abstract AIFunctionMetadata Metadata { get; }
Functions\AIFunctionMetadata.cs (4)
37/// <summary>Initializes a new instance of the <see cref="AIFunctionMetadata"/> class for a function with the specified name.</summary> 45/// <summary>Initializes a new instance of the <see cref="AIFunctionMetadata"/> class as a copy of another <see cref="AIFunctionMetadata"/>.</summary> 51public AIFunctionMetadata(AIFunctionMetadata metadata)
Utilities\AIJsonUtilities.Schema.cs (1)
59AIFunctionMetadata functionMetadata,
Microsoft.Extensions.AI.Abstractions.Tests (10)
Contents\FunctionCallContentTests..cs (1)
254public override AIFunctionMetadata Metadata => new("NetTypeless")
Functions\AIFunctionMetadataTests.cs (6)
17Assert.Throws<ArgumentNullException>("metadata", () => new AIFunctionMetadata((AIFunctionMetadata)null!)); 23AIFunctionMetadata f = new("name"); 41AIFunctionMetadata f1 = new("name") 49AIFunctionMetadata f2 = new(f1); 69AIFunctionMetadata f = new("name") { Description = null }; 82AIFunctionMetadata f = new("name")
Functions\AIFunctionTests.cs (1)
38public override AIFunctionMetadata Metadata => new("name");
Utilities\AIJsonUtilitiesTests.cs (2)
218AIFunctionMetadata metadata = func.Metadata; 239AIFunctionMetadata metadata = func.Metadata;