类 DocumentLoader
java.lang.Object
dev.langchain4j.data.document.DocumentLoader
Utility class for loading documents.
-
方法概要
修饰符和类型方法说明static Documentload(DocumentSource source, DocumentParser parser) Loads a document from the given source using the given parser.
-
方法详细资料
-
load
Loads a document from the given source using the given parser.Forwards the source Metadata to the parsed Document.
- 参数:
source- The source from which the document will be loaded.parser- The parser that will be used to parse the document.- 返回:
- The loaded document.
- 抛出:
BlankDocumentException- when the parsedDocumentis blank/empty.
-