9 instantiations of ClassificationEnricher
Microsoft.Extensions.DataIngestion.Tests (9)
Processors\ClassificationEnricherTests.cs (9)
20
Assert.Throws<ArgumentNullException>("chatClient", () => new
ClassificationEnricher
(null!, predefinedClasses: ["some"]));
26
Assert.Throws<ArgumentException>("predefinedClasses", () => new
ClassificationEnricher
(new TestChatClient(), predefinedClasses: []));
32
Assert.Throws<ArgumentException>("predefinedClasses", () => new
ClassificationEnricher
(new TestChatClient(), predefinedClasses: ["same", "same"]));
38
Assert.Throws<ArgumentException>("predefinedClasses", () => new
ClassificationEnricher
(new TestChatClient(), predefinedClasses: ["same", "Unknown"]));
44
Assert.Throws<ArgumentException>("predefinedClasses", () => new
ClassificationEnricher
(new TestChatClient(), predefinedClasses: ["some"], fallbackClass: "some"));
50
Assert.Throws<ArgumentException>("predefinedClasses", () => new
ClassificationEnricher
(new TestChatClient(), predefinedClasses: ["n,t"]));
57
ClassificationEnricher sut =
new
(chatClient, predefinedClasses: ["some"]);
89
ClassificationEnricher sut =
new
(chatClient, ["AI", "Animals", "Sports"], fallbackClass: "UFO");
113
ClassificationEnricher sut =
new
(chatClient, ["AI", "Animals", "Sports"]);
7 references to ClassificationEnricher
Microsoft.Extensions.DataIngestion (1)
Processors\ClassificationEnricher.cs (1)
30
/// Initializes a new instance of the <see cref="
ClassificationEnricher
"/> class.
Microsoft.Extensions.DataIngestion.Tests (6)
Processors\ClassificationEnricherTests.cs (6)
57
ClassificationEnricher
sut = new(chatClient, predefinedClasses: ["some"]);
89
ClassificationEnricher
sut = new(chatClient, ["AI", "Animals", "Sports"], fallbackClass: "UFO");
94
Assert.Equal("AI", got[0].Metadata[
ClassificationEnricher
.MetadataKey]);
95
Assert.Equal("Animals", got[1].Metadata[
ClassificationEnricher
.MetadataKey]);
96
Assert.Equal("UFO", got[2].Metadata[
ClassificationEnricher
.MetadataKey]);
113
ClassificationEnricher
sut = new(chatClient, ["AI", "Animals", "Sports"]);