Class UrlDocumentLoader
java.lang.Object
dev.langchain4j.data.document.loader.UrlDocumentLoader
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Document
load
(String url, DocumentParser documentParser) Loads a document from the specified URL.static Document
load
(URL url, DocumentParser documentParser) Loads a document from the specified URL.
-
Constructor Details
-
UrlDocumentLoader
public UrlDocumentLoader()
-
-
Method Details
-
load
Loads a document from the specified URL.- Parameters:
url
- The URL of the file.documentParser
- The parser to be used for parsing text from the URL.- Returns:
- document
-
load
Loads a document from the specified URL.- Parameters:
url
- The URL of the file.documentParser
- The parser to be used for parsing text from the URL.- Returns:
- document
- Throws:
RuntimeException
- If specified URL is malformed.
-