Class HybridChunkerOptions

java.lang.Object
ai.docling.serve.api.chunk.request.options.ChunkerOptions
ai.docling.serve.api.chunk.request.options.HybridChunkerOptions

public final class HybridChunkerOptions extends ChunkerOptions
Options for configuring the hybrid chunker.
  • Method Details

    • builder

      public static @NonNull HybridChunkerOptions.Builder builder()
    • toBuilder

      public @NonNull HybridChunkerOptions.Builder toBuilder()
    • isUseMarkdownTables

      public boolean isUseMarkdownTables()
      Use markdown table format instead of triplets for table serialization.
      Returns:
      true if markdown tables should be used, false otherwise
    • isIncludeRawText

      public boolean isIncludeRawText()
      Include both raw_text and text (contextualized) in response. If False, only text is included.
      Returns:
      true if raw text should be included, false otherwise
    • getMaxTokens

      public @Nullable Integer getMaxTokens()
      Maximum number of tokens per chunk. When left to none, the value is automatically extracted from the tokenizer.
      Returns:
      the maximum number of tokens per chunk, or null if not specified
    • getTokenizer

      public @Nullable String getTokenizer()
      HuggingFace model name for custom tokenization. If not specified, uses 'sentence-transformers/all-MiniLM-L6-v2' as default.
      Returns:
      the tokenizer model name, or null to use the default
    • getMergePeers

      public Boolean getMergePeers()
      Merge undersized successive chunks with same headings.
      Returns:
      true if chunks should be merged, false otherwise, or null if not specified
    • toString

      public @NonNull String toString()
      Overrides:
      toString in class ChunkerOptions