UnstructuredLoader document loaders. For detailed documentation of all UnstructuredLoader features and configurations head to the API reference.
Overview
Integration details
| Class | Package | Compatibility | Local | PY support |
|---|---|---|---|---|
| UnstructuredLoader | @langchain/community | Node-only | ✅ | ✅ |
Setup
To accessUnstructuredLoader document loader you’ll need to 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. You can find the instructions to install Docker here.Credentials
Head to unstructured.io to sign up to Unstructured and generate an API key. Once you’ve done this set theUNSTRUCTURED_API_KEY environment variable:
Installation
The LangChain UnstructuredLoader integration lives in the@langchain/community package:
Instantiation
Now we can instantiate our model object and load documents:Load
Directories
You can also load all of the files in the directory usingUnstructuredDirectoryLoader, which inherits from DirectoryLoader: