Files
langchain/docs
Matt Robinson c51dec5101 feat: add Unstructured API loaders (#3906)
### 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]
```
2023-05-01 20:37:35 -07:00
..
2023-04-26 15:57:48 -07:00
2023-05-01 20:34:50 -07:00
2023-04-30 11:14:09 -07:00
2023-05-01 20:25:03 -07:00
2023-04-19 15:06:59 -07:00
2023-03-26 19:49:46 -07:00
2023-04-30 11:14:09 -07:00
2022-10-24 14:51:15 -07:00
2023-03-30 08:20:30 -07:00
2023-04-30 11:14:09 -07:00