Package com.embabel.agent.rag.ingestion
Class ContentChunker
-
- All Implemented Interfaces:
public final class ContentChunkerConverts 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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceContentChunker.Configpublic final classContentChunker.DefaultConfigConfiguration for the splitter
-
Field Summary
Fields Modifier and Type Field Description private final ContentChunker.Configconfig
-
Constructor Summary
Constructors Constructor Description ContentChunker(ContentChunker.Config config)
-
Method Summary
Modifier and Type Method Description final ContentChunker.ConfiggetConfig()final List<Chunk>chunk(MaterializedContainerSection section)Split a MaterializedContainerSection into one or more Chunks final List<Chunk>splitSections(List<MaterializedContainerSection> sections)Split multiple MaterializedContainerSections into Chunks -
-
Constructor Detail
-
ContentChunker
ContentChunker(ContentChunker.Config config)
-
-
Method Detail
-
getConfig
final ContentChunker.Config getConfig()
-
chunk
final List<Chunk> chunk(MaterializedContainerSection section)
Split a MaterializedContainerSection into one or more Chunks
-
splitSections
final List<Chunk> splitSections(List<MaterializedContainerSection> sections)
Split multiple MaterializedContainerSections into Chunks
-
-
-
-