Class MarkdownDocumentReaderConfig.Builder

java.lang.Object
org.springframework.ai.reader.markdown.config.MarkdownDocumentReaderConfig.Builder
Enclosing class:
MarkdownDocumentReaderConfig

public static final class MarkdownDocumentReaderConfig.Builder extends Object
  • Method Details

    • withHorizontalRuleCreateDocument

      public MarkdownDocumentReaderConfig.Builder withHorizontalRuleCreateDocument(boolean horizontalRuleCreateDocument)
      Text divided by horizontal lines will create new Documents. The default is false, meaning text separated by horizontal lines won't create a new document.
      Parameters:
      horizontalRuleCreateDocument - flag to determine whether new documents are created from text divided by horizontal line
      Returns:
      this builder
    • withIncludeCodeBlock

      public MarkdownDocumentReaderConfig.Builder withIncludeCodeBlock(boolean includeCodeBlock)
      Whatever to include code blocks in Documents. The default is false, which means all code blocks are in separate documents.
      Parameters:
      includeCodeBlock - flag to include code block into paragraph document or create new with code only
      Returns:
      this builder
    • withIncludeBlockquote

      public MarkdownDocumentReaderConfig.Builder withIncludeBlockquote(boolean includeBlockquote)
      Whatever to include blockquotes in Documents. The default is false, which means all blockquotes are in separate documents.
      Parameters:
      includeBlockquote - flag to include blockquotes into paragraph document or create new with blockquote only
      Returns:
      this builder
    • withAdditionalMetadata

      public MarkdownDocumentReaderConfig.Builder withAdditionalMetadata(String key, Object value)
      Adds this additional metadata to the all built Documents.
      Returns:
      this builder
    • withAdditionalMetadata

      public MarkdownDocumentReaderConfig.Builder withAdditionalMetadata(Map<String,Object> additionalMetadata)
      Adds this additional metadata to the all built Documents.
      Returns:
      this builder
    • build

      Returns:
      the immutable configuration