Skip to main content
Compatibility: Only available on Node.js.
This notebook provides a quick overview for getting started with UnstructuredLoader document loaders. For detailed documentation of all UnstructuredLoader features and configurations head to the API reference.

概述

集成详情

设置

要访问 UnstructuredLoader document loader,你需要install the @langchain/community integration package, and create an Unstructured account and get an API key.

Local

You can run Unstructured locally in your computer using Docker. To do so, you need to have Docker installed.

凭证

前往 unstructured.io 注册 Unstructured 并生成 API 密钥。完成后设置 UNSTRUCTURED_API_KEY 环境变量:

安装

LangChain 的 UnstructuredLoader 集成位于 @langchain/community 包中:

实例化

Now we can instantiate our model object and load documents:

Load

Directories

You can also load all of the files in the directory using UnstructuredDirectoryLoader, which inherits from DirectoryLoader:

API 参考

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