Class MarkdownDocumentReader

java.lang.Object
org.springframework.ai.reader.markdown.MarkdownDocumentReader
All Implemented Interfaces:
Supplier<List<Document>>, DocumentReader

public class MarkdownDocumentReader extends Object implements DocumentReader
Reads the given Markdown resource and groups headers, paragraphs, or text divided by horizontal lines (depending on the MarkdownDocumentReaderConfig.horizontalRuleCreateDocument configuration) into Documents.
Author:
Piotr Olaszewski
  • Constructor Details

    • MarkdownDocumentReader

      public MarkdownDocumentReader(String markdownResource)
      Create a new MarkdownDocumentReader instance.
      Parameters:
      markdownResource - the resource to read
    • MarkdownDocumentReader

      public MarkdownDocumentReader(String markdownResource, MarkdownDocumentReaderConfig config)
      Create a new MarkdownDocumentReader instance.
      Parameters:
      markdownResource - the resource to read
      config - the configuration to use
    • MarkdownDocumentReader

      public MarkdownDocumentReader(org.springframework.core.io.Resource markdownResource, MarkdownDocumentReaderConfig config)
      Create a new MarkdownDocumentReader instance.
      Parameters:
      markdownResource - the resource to read
  • Method Details