Skip to content

Commit

Permalink
community[patch]: Use langchain-astradb for AstraDB doc loader (langc…
Browse files Browse the repository at this point in the history
…hain-ai#19071)

Co-authored-by: Bagatur <baskaryan@gmail.com>
Co-authored-by: Bagatur <22008038+baskaryan@users.noreply.github.com>
  • Loading branch information
3 people committed Mar 15, 2024
1 parent a49ac55 commit f2a7dda
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
13 changes: 4 additions & 9 deletions docs/docs/integrations/providers/astradb.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,7 @@ See a [tutorial provided by DataStax](https://docs.datastax.com/en/astra/astra-d

Install the following Python package:
```bash
pip install "langchain-astradb>=0.0.1"
```

Some old integrations require the `astrapy` package:
```bash
pip install "astrapy>=0.7.1"
pip install "langchain-astradb>=0.1.0"
```

Get the [connection secrets](https://docs.datastax.com/en/astra/astra-db-vector/get-started/quickstart.html).
Expand Down Expand Up @@ -92,7 +87,7 @@ Learn more in the [example notebook](/docs/integrations/memory/astradb_chat_mess
## Document loader

```python
from langchain_community.document_loaders import AstraDBLoader
from langchain_astradb import AstraDBLoader

loader = AstraDBLoader(
collection_name="my_collection",
Expand Down Expand Up @@ -129,7 +124,7 @@ Learn more in the [example notebook](/docs/integrations/retrievers/self_query/as
## Store

```python
from langchain_community.storage import AstraDBStore
from langchain_astradb import AstraDBStore

store = AstraDBStore(
collection_name="my_kv_store",
Expand All @@ -143,7 +138,7 @@ Learn more in the [example notebook](/docs/integrations/stores/astradb#astradbst
## Byte Store

```python
from langchain_community.storage import AstraDBByteStore
from langchain_astradb import AstraDBByteStore

store = AstraDBByteStore(
collection_name="my_kv_store",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
Optional,
)

from langchain_core._api.deprecation import deprecated
from langchain_core.documents import Document

from langchain_community.document_loaders.base import BaseLoader
Expand All @@ -24,6 +25,11 @@
logger = logging.getLogger(__name__)


@deprecated(
since="0.0.29",
removal="0.2.0",
alternative_import="langchain_astradb.AstraDBLoader",
)
class AstraDBLoader(BaseLoader):
def __init__(
self,
Expand Down

0 comments on commit f2a7dda

Please sign in to comment.