Skip to content

Conversation

@adamsitnik
Copy link
Owner

@adamsitnik adamsitnik requested a review from Copilot October 21, 2025 18:45
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR addresses API feedback by refactoring chunker and enricher constructors to accept options objects containing tokenizers instead of separate tokenizer parameters, and making optional parameters nullable with defaults applied internally.

Key changes:

  • Modified chunker constructors to accept IngestionChunkerOptions (which now includes Tokenizer) instead of separate tokenizer and options parameters
  • Made optional parameters in enricher constructors nullable (int?, double?) with default values applied internally
  • Removed TokenCount property from IngestionChunk<T> class
  • Changed parameter types from string[] to ReadOnlySpan<string> in enricher classes

Reviewed Changes

Copilot reviewed 21 out of 21 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
IngestionChunkerOptions.cs Added constructor requiring Tokenizer parameter and Tokenizer property
HeaderChunker.cs Updated constructor to accept IngestionChunkerOptions instead of separate tokenizer parameter
SectionChunker.cs Updated constructor to accept IngestionChunkerOptions instead of separate tokenizer parameter
SemanticSimilarityChunker.cs Updated constructor to accept IngestionChunkerOptions and made thresholdPercentile nullable
DocumentTokenChunker.cs Updated constructor to accept IngestionChunkerOptions instead of separate tokenizer parameter
ElementsChunker.cs Updated to extract tokenizer from IngestionChunkerOptions
IngestionChunk.cs Removed TokenCount property and parameter from constructor
SummaryEnricher.cs Made maxWordCount parameter nullable with default applied internally
SentimentEnricher.cs Made confidenceThreshold parameter nullable with default applied internally
KeywordEnricher.cs Changed predefinedKeywords to ReadOnlySpan and made optional parameters nullable
ClassificationEnricher.cs Changed predefinedClasses to ReadOnlySpan and made fallbackClass nullable
IngestionDocument.cs Changed Metadata property type from Dictionary to IDictionary
Test files Updated all test instantiations to use new constructor patterns

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@adamsitnik adamsitnik merged commit 2aa0fa5 into main Oct 21, 2025
1 check passed
@adamsitnik adamsitnik deleted the apiFeedbackNext branch October 21, 2025 18:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants