mirror of
https://github.com/hwchase17/langchain
synced 2024-10-29 17:07:25 +00:00
bf3f554357
### Submit Multiple Files to the Unstructured API Enables batching multiple files into a single Unstructured API requests. Support for requests with multiple files was added to both `UnstructuredAPIFileLoader` and `UnstructuredAPIFileIOLoader`. Note that if you submit multiple files in "single" mode, the result will be concatenated into a single document. We recommend using this feature in "elements" mode. ### Testing The following should load both documents, using two of the example docs from the integration tests folder. ```python from langchain.document_loaders import UnstructuredAPIFileLoader file_paths = ["examples/layout-parser-paper.pdf", "examples/whatsapp_chat.txt"] loader = UnstructuredAPIFileLoader( file_paths=file_paths, api_key="FAKE_API_KEY", strategy="fast", mode="elements", ) docs = loader.load() ``` |
||
---|---|---|
.. | ||
document_loaders/examples | ||
retrievers/examples | ||
text_splitters | ||
vectorstores | ||
document_loaders.rst | ||
getting_started.ipynb | ||
retrievers.rst | ||
text_splitters.rst | ||
vectorstores.rst |