Class MarkdownDocumentReader
java.lang.Object
org.springframework.ai.reader.markdown.MarkdownDocumentReader
- All Implemented Interfaces:
Supplier<List<Document>>
,DocumentReader
Reads the given Markdown resource and groups headers, paragraphs, or text divided by
horizontal lines (depending on the
MarkdownDocumentReaderConfig.horizontalRuleCreateDocument
configuration) into
Document
s.- Author:
- Piotr Olaszewski
-
Constructor Summary
ConstructorDescriptionMarkdownDocumentReader
(String markdownResource) Create a newMarkdownDocumentReader
instance.MarkdownDocumentReader
(String markdownResource, MarkdownDocumentReaderConfig config) Create a newMarkdownDocumentReader
instance.MarkdownDocumentReader
(org.springframework.core.io.Resource markdownResource, MarkdownDocumentReaderConfig config) Create a newMarkdownDocumentReader
instance. -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.ai.document.DocumentReader
read
-
Constructor Details
-
MarkdownDocumentReader
Create a newMarkdownDocumentReader
instance.- Parameters:
markdownResource
- the resource to read
-
MarkdownDocumentReader
Create a newMarkdownDocumentReader
instance.- Parameters:
markdownResource
- the resource to readconfig
- the configuration to use
-
MarkdownDocumentReader
public MarkdownDocumentReader(org.springframework.core.io.Resource markdownResource, MarkdownDocumentReaderConfig config) Create a newMarkdownDocumentReader
instance.- Parameters:
markdownResource
- the resource to read
-
-
Method Details