17 references to AIFunctionMetadata
Microsoft.Extensions.AI (1)
Functions\AIFunctionFactory.cs (1)
268Metadata = new AIFunctionMetadata(functionName)
Microsoft.Extensions.AI.Abstractions.Tests (16)
Contents\FunctionCallContentTests..cs (1)
254public override AIFunctionMetadata Metadata => new("NetTypeless")
Functions\AIFunctionMetadataTests.cs (12)
15Assert.Throws<ArgumentNullException>("name", () => new AIFunctionMetadata((string)null!)); 16Assert.Throws<ArgumentException>("name", () => new AIFunctionMetadata(" \t ")); 23AIFunctionMetadata f = new("name"); 35Assert.Same(f.AdditionalProperties, new AIFunctionMetadata("name2").AdditionalProperties); 41AIFunctionMetadata f1 = new("name") 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");