Class HybridChunkerOptions.Builder
java.lang.Object
ai.docling.serve.api.chunk.request.options.HybridChunkerOptions.Builder
- Enclosing class:
- HybridChunkerOptions
Builder for creating
HybridChunkerOptions instances.
Generated by Lombok's @Builder annotation.
Builder methods:
useMarkdownTables(boolean)- Set whether to use markdown table formatincludeRawText(boolean)- Set whether to include raw text in responsemaxTokens(Integer)- Set the maximum number of tokens per chunktokenizer(String)- Set the HuggingFace model name for tokenizationmergePeers(Boolean)- Set whether to merge undersized successive chunks
-
Method Summary
Modifier and TypeMethodDescription@NonNull HybridChunkerOptionsbuild()@NonNull HybridChunkerOptions.BuilderincludeRawText(boolean includeRawText) Include both raw_text and text (contextualized) in response.@NonNull HybridChunkerOptions.BuilderMaximum number of tokens per chunk.@NonNull HybridChunkerOptions.BuildermergePeers(Boolean mergePeers) Merge undersized successive chunks with same headings.@NonNull HybridChunkerOptions.BuilderHuggingFace model name for custom tokenization.@NonNull StringtoString()@NonNull HybridChunkerOptions.BuilderuseMarkdownTables(boolean useMarkdownTables) Use markdown table format instead of triplets for table serialization.
-
Method Details
-
useMarkdownTables
Use markdown table format instead of triplets for table serialization.- Parameters:
useMarkdownTables- true if markdown tables should be used, false otherwise- Returns:
this.
-
includeRawText
Include both raw_text and text (contextualized) in response. If False, only text is included.- Parameters:
includeRawText- true if raw text should be included, false otherwise- Returns:
this.
-
maxTokens
Maximum number of tokens per chunk. When left to none, the value is automatically extracted from the tokenizer.- Parameters:
maxTokens- the maximum number of tokens per chunk, or null if not specified- Returns:
this.
-
tokenizer
HuggingFace model name for custom tokenization. If not specified, uses 'sentence-transformers/all-MiniLM-L6-v2' as default.- Parameters:
tokenizer- the tokenizer model name, or null to use the default- Returns:
this.
-
mergePeers
Merge undersized successive chunks with same headings.- Parameters:
mergePeers- true if chunks should be merged, false otherwise, or null if not specified- Returns:
this.
-
build
-
toString
-