Package dev.langchain4j.data.document
Class DocumentLoader
java.lang.Object
dev.langchain4j.data.document.DocumentLoader
Utility class for loading documents.
-
Method Summary
Modifier and TypeMethodDescriptionstatic Document
load
(DocumentSource source, DocumentParser parser) Loads a document from the given source using the given parser.
-
Method Details
-
load
Loads a document from the given source using the given parser.Forwards the source Metadata to the parsed Document.
- Parameters:
source
- The source from which the document will be loaded.parser
- The parser that will be used to parse the document.- Returns:
- The loaded document.
- Throws:
BlankDocumentException
- when the parsedDocument
is blank/empty.
-