Files
langchain/docs/ecosystem
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-01-02 08:24:09 -08:00
2023-03-30 20:58:14 -07:00
2023-03-26 19:49:46 -07:00
2023-03-26 19:49:46 -07:00
2023-04-10 18:49:47 -07:00
2023-02-23 07:37:15 -08:00
2023-04-09 12:55:22 -07:00
2023-03-26 19:49:46 -07:00
2023-04-04 07:21:50 -07:00
2023-04-30 11:14:09 -07:00
2023-01-02 08:24:09 -08:00
2023-04-06 12:42:01 -07:00
2023-04-27 08:14:36 -07:00
cr
2023-04-04 07:25:28 -07:00
2023-04-26 15:57:48 -07:00
2023-03-26 19:49:46 -07:00
2023-04-22 09:17:38 -07:00
2023-01-02 08:24:09 -08:00
2023-03-26 19:49:46 -07:00
2023-02-22 10:34:16 -08:00
2023-03-26 19:49:46 -07:00
2023-03-26 19:49:46 -07:00
2023-03-26 19:49:46 -07:00
2023-04-28 20:47:18 -07:00
2023-04-06 14:41:06 -07:00
2023-03-26 19:49:46 -07:00
2023-04-28 21:25:33 -07:00
2023-03-26 19:49:46 -07:00
2023-04-20 15:20:21 -07:00