ContentChunker

class ContentChunker(val config: ContentChunker.Config = DefaultConfig())

Converts MaterializedContainerSection objects into Chunk objects with intelligent text splitting.

For container sections with small total content (aggregated from leaves), creates a single chunk containing all leaf content. For large leaf sections within containers, splits them individually into multiple chunks.

Constructors

Link copied to clipboard
constructor(config: ContentChunker.Config = DefaultConfig())

Types

Link copied to clipboard
interface Config
Link copied to clipboard
data class DefaultConfig constructor(val maxChunkSize: Int = 1500, val overlapSize: Int = 200) : ContentChunker.Config

Configuration for the splitter

Properties

Link copied to clipboard

Functions

Link copied to clipboard

Split a MaterializedContainerSection into one or more Chunks

Link copied to clipboard

Split multiple MaterializedContainerSections into Chunks