Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions libs/unstructured/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@ This package contains the LangChain integration with Unstructured
## Installation

```bash
pip install -U langchain-unstructured
pip install -U 'langchain-unstructured[all_docs]'
```

And you should configure credentials by setting the following environment variables:

```bash
pip install -U 'langchain-unstructured[client]'
export UNSTRUCTURED_API_KEY="your-api-key"
```

Expand All @@ -20,11 +21,11 @@ Partition and load files using either the `unstructured-client` sdk and the
Unstructured API or locally using the `unstructured` library.

API:
To partition via the Unstructured API `pip install unstructured-client` and set
`partition_via_api=True` and define `api_key`. If you are running the unstructured API
locally, you can change the API rule by defining `url` when you initialize the
loader. The hosted Unstructured API requires an API key. See the links below to
learn more about our API offerings and get an API key.
To partition via the Unstructured API set `partition_via_api=True` and define
`api_key`. If you are running the unstructured API locally, you can change the API rule
by defining `url` when you initialize the loader. The hosted Unstructured API requires
an API key. See the links below to learn more about our API offerings and get an
API key.

Local:
By default the file loader uses the Unstructured `partition` function and will
Expand All @@ -37,8 +38,7 @@ Unstructured kwargs to the loader to configure different unstructured settings.

Setup:
```bash
pip install -U langchain-unstructured
pip install -U unstructured-client
pip install -U 'langchain-unstructured[client]'
export UNSTRUCTURED_API_KEY="your-api-key"
```

Expand Down
Binary file added libs/unstructured/example_docs/hello.pdf
Binary file not shown.
Binary file not shown.
11 changes: 9 additions & 2 deletions libs/unstructured/langchain_unstructured/__init__.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,22 @@
from importlib import metadata

from langchain_unstructured.document_loaders import UnstructuredLoader
from .document_loaders import (
UnstructuredLoader,
UnstructuredPDFLoader,
UnstructuredPDFParser,
)

""" Documentation du module unstructured patch"""
try:
__version__ = metadata.version(__package__) # type: ignore
__version__ = metadata.version(__package__)
except metadata.PackageNotFoundError:
# Case where package metadata is not available.
__version__ = ""
del metadata # optional, avoids polluting the results of dir(__package__)

__all__ = [
"UnstructuredPDFLoader",
"UnstructuredPDFParser",
"UnstructuredLoader",
"__version__",
]
Loading