Class UrlDocumentLoader
java.lang.Object
dev.langchain4j.data.document.loader.UrlDocumentLoader
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Documentload(String url, DocumentParser documentParser) Loads a document from the specified URL.static Documentload(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.
-