26 references to new
Microsoft.Extensions.DataIngestion (1)
Processors\EnricherOptions.cs (1)
48internal EnricherOptions Clone() => new(ChatClient)
Microsoft.Extensions.DataIngestion.Tests (25)
Processors\AlternativeTextEnricherTests.cs (4)
30ImageAlternativeTextEnricher sut = new(new(chatClient)); 65ImageAlternativeTextEnricher sut = new(new(chatClient)); 151ImageAlternativeTextEnricher sut = new(new(chatClient) { BatchSize = batchSize }); 169EnricherOptions options = new(chatClient) { LoggerFactory = loggerFactory };
Processors\ClassificationEnricherTests.cs (7)
29Assert.Throws<ArgumentException>("predefinedClasses", () => new ClassificationEnricher(new(new TestChatClient()), predefinedClasses: [])); 35Assert.Throws<ArgumentException>("predefinedClasses", () => new ClassificationEnricher(new(new TestChatClient()), predefinedClasses: ["same", "same"])); 41Assert.Throws<ArgumentException>("predefinedClasses", () => new ClassificationEnricher(new(new TestChatClient()), predefinedClasses: ["same", "Unknown"])); 47Assert.Throws<ArgumentException>("predefinedClasses", () => new ClassificationEnricher(new(new TestChatClient()), predefinedClasses: ["some"], fallbackClass: "some")); 54ClassificationEnricher sut = new(new(chatClient), predefinedClasses: ["some"]); 88ClassificationEnricher sut = new(new(chatClient), ["AI", "Animals", "Sports"], fallbackClass: "UFO"); 108ClassificationEnricher sut = new(new(chatClient) { LoggerFactory = loggerFactory }, ["AI", "Other"]);
Processors\KeywordEnricherTests.cs (6)
31Assert.Throws<ArgumentOutOfRangeException>("confidenceThreshold", () => new KeywordEnricher(new(new TestChatClient()), predefinedKeywords: null, confidenceThreshold: threshold)); 39Assert.Throws<ArgumentOutOfRangeException>("maxKeywords", () => new KeywordEnricher(new(new TestChatClient()), predefinedKeywords: null, maxKeywords: keywordCount)); 45Assert.Throws<ArgumentException>("predefinedKeywords", () => new KeywordEnricher(new(new TestChatClient()), predefinedKeywords: ["same", "same"], confidenceThreshold: 0.5)); 52KeywordEnricher sut = new(new(chatClient), predefinedKeywords: null, confidenceThreshold: 0.5); 89KeywordEnricher sut = new(new(chatClient), predefinedKeywords: predefined, confidenceThreshold: 0.5); 108KeywordEnricher sut = new(new(chatClient) { LoggerFactory = loggerFactory }, ["AI", "Other"]);
Processors\SentimentEnricherTests.cs (4)
31Assert.Throws<ArgumentOutOfRangeException>("confidenceThreshold", () => new SentimentEnricher(new(new TestChatClient()), confidenceThreshold: threshold)); 38SentimentEnricher sut = new(new(chatClient)); 72SentimentEnricher sut = new(new(chatClient)); 95SentimentEnricher sut = new(new(chatClient) { LoggerFactory = loggerFactory });
Processors\SummaryEnricherTests.cs (4)
31Assert.Throws<ArgumentOutOfRangeException>("maxWordCount", () => new SummaryEnricher(new(new TestChatClient()), maxWordCount: wordCount)); 38SummaryEnricher sut = new(new(chatClient)); 72SummaryEnricher sut = new(new(chatClient)); 92SummaryEnricher sut = new(new(chatClient) { LoggerFactory = loggerFactory });