|
|
@ -10,12 +10,7 @@ See a [tutorial provided by DataStax](https://docs.datastax.com/en/astra/astra-d
|
|
|
|
|
|
|
|
|
|
|
|
Install the following Python package:
|
|
|
|
Install the following Python package:
|
|
|
|
```bash
|
|
|
|
```bash
|
|
|
|
pip install "langchain-astradb>=0.0.1"
|
|
|
|
pip install "langchain-astradb>=0.1.0"
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Some old integrations require the `astrapy` package:
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
|
|
|
pip install "astrapy>=0.7.1"
|
|
|
|
|
|
|
|
```
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
Get the [connection secrets](https://docs.datastax.com/en/astra/astra-db-vector/get-started/quickstart.html).
|
|
|
|
Get the [connection secrets](https://docs.datastax.com/en/astra/astra-db-vector/get-started/quickstart.html).
|
|
|
@ -92,7 +87,7 @@ Learn more in the [example notebook](/docs/integrations/memory/astradb_chat_mess
|
|
|
|
## Document loader
|
|
|
|
## Document loader
|
|
|
|
|
|
|
|
|
|
|
|
```python
|
|
|
|
```python
|
|
|
|
from langchain_community.document_loaders import AstraDBLoader
|
|
|
|
from langchain_astradb import AstraDBLoader
|
|
|
|
|
|
|
|
|
|
|
|
loader = AstraDBLoader(
|
|
|
|
loader = AstraDBLoader(
|
|
|
|
collection_name="my_collection",
|
|
|
|
collection_name="my_collection",
|
|
|
@ -129,7 +124,7 @@ Learn more in the [example notebook](/docs/integrations/retrievers/self_query/as
|
|
|
|
## Store
|
|
|
|
## Store
|
|
|
|
|
|
|
|
|
|
|
|
```python
|
|
|
|
```python
|
|
|
|
from langchain_community.storage import AstraDBStore
|
|
|
|
from langchain_astradb import AstraDBStore
|
|
|
|
|
|
|
|
|
|
|
|
store = AstraDBStore(
|
|
|
|
store = AstraDBStore(
|
|
|
|
collection_name="my_kv_store",
|
|
|
|
collection_name="my_kv_store",
|
|
|
@ -143,7 +138,7 @@ Learn more in the [example notebook](/docs/integrations/stores/astradb#astradbst
|
|
|
|
## Byte Store
|
|
|
|
## Byte Store
|
|
|
|
|
|
|
|
|
|
|
|
```python
|
|
|
|
```python
|
|
|
|
from langchain_community.storage import AstraDBByteStore
|
|
|
|
from langchain_astradb import AstraDBByteStore
|
|
|
|
|
|
|
|
|
|
|
|
store = AstraDBByteStore(
|
|
|
|
store = AstraDBByteStore(
|
|
|
|
collection_name="my_kv_store",
|
|
|
|
collection_name="my_kv_store",
|
|
|
|