namespace AIStudio.Tools.Services.Indexing; /// /// One way to cut a text into smaller units, tried when the text is too large for a single chunk. /// /// The name of the rule, for the log. /// Cuts a text into units, given the text and the segments it was made of. Null means a hard cut. /// Whether the units are the segments themselves, so their token counts and pages can be reused. internal sealed record ChunkingRule(string Name, Func, IReadOnlyList>? Split, bool UsesSourceSegmentCounts = false);