org.llm4s.chunking.ChunkingConfig
See theChunkingConfig companion object
final case class ChunkingConfig(targetSize: Int, maxSize: Int, overlap: Int, minChunkSize: Int, preserveCodeBlocks: Boolean, preserveHeadings: Boolean)
Configuration for document chunking.
Value parameters
- maxSize
-
Maximum chunk size (hard limit, will force split)
- minChunkSize
-
Minimum size for a chunk (smaller chunks are merged)
- overlap
-
Characters to overlap between chunks
- preserveCodeBlocks
-
Keep code blocks intact if possible
- preserveHeadings
-
Include heading context in metadata
- targetSize
-
Target chunk size in characters (soft limit)
Attributes
- Companion
- object
- Graph
-
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass Any
Members list
In this article