Skip to main content
Compatibility: Only available on Node.js.
This notebook provides a quick overview for getting started with DirectoryLoader document loaders. For detailed documentation of all DirectoryLoader features and configurations head to the API reference. This example goes over how to load data from folders with multiple files. The second argument is a map of file extensions to loader factories. Each file will be passed to the matching loader, and the resulting documents will be concatenated together. Example folder:

概述

集成详情

设置

要访问 DirectoryLoader document loader,你需要install the langchain package.

安装

LangChain 的 DirectoryLoader 集成位于 langchain 包中:

实例化

Now we can instantiate our model object and load documents:

Load


API 参考

有关所有 DirectoryLoader 功能和配置的详细文档,请前往 API 参考