mirror of
https://github.com/hwchase17/langchain.git
synced 2025-05-21 15:07:35 +00:00
### Summary Adds `UnstructuredAPIFileLoaders` and `UnstructuredAPIFIleIOLoaders` that partition documents through the Unstructured API. Defaults to the URL for hosted Unstructured API, but can switch to a self hosted or locally running API using the `url` kwarg. Currently, the Unstructured API is open and does not require an API, but it will soon. A note was added about that to the Unstructured ecosystem page. ### Testing ```python from langchain.document_loaders import UnstructuredAPIFileIOLoader filename = "fake-email.eml" with open(filename, "rb") as f: loader = UnstructuredAPIFileIOLoader(file=f, file_filename=filename) docs = loader.load() docs[0] ``` ```python from langchain.document_loaders import UnstructuredAPIFileLoader filename = "fake-email.eml" loader = UnstructuredAPIFileLoader(file_path=filename, mode="elements") docs = loader.load() docs[0] ``` |
||
---|---|---|
.. | ||
_static | ||
ecosystem | ||
getting_started | ||
modules | ||
reference | ||
tracing | ||
use_cases | ||
conf.py | ||
deployments.md | ||
ecosystem.rst | ||
gallery.rst | ||
glossary.md | ||
index.rst | ||
make.bat | ||
Makefile | ||
model_laboratory.ipynb | ||
reference.rst | ||
requirements.txt | ||
tracing.md | ||
youtube.md |