Skip to main content

Merge Documents Loader

Merge the documents returned from a set of specified data loaders.

from langchain_community.document_loaders import WebBaseLoader

loader_web = WebBaseLoader(
API Reference:WebBaseLoader
from langchain_community.document_loaders import PyPDFLoader

loader_pdf = PyPDFLoader("../MachineLearning-Lecture01.pdf")
API Reference:PyPDFLoader
from langchain_community.document_loaders.merge import MergedDataLoader

loader_all = MergedDataLoader(loaders=[loader_web, loader_pdf])
API Reference:MergedDataLoader
docs_all = loader_all.load()

Was this page helpful?

You can leave detailed feedback on GitHub.