An integration package connecting Astra DB and LangChain
Project description
langchain-astradb
This package contains the LangChain integrations for using DataStax Astra DB.
DataStax Astra DB is a serverless vector-capable database built on Apache Cassandra® and made conveniently available through an easy-to-use JSON API.
Installation and Setup
Installation of this partner package:
pip install langchain-astradb
Integrations overview
See the LangChain docs page and the API reference for more details.
Vector Store
from langchain_astradb import AstraDBVectorStore
my_store = AstraDBVectorStore(
embedding=my_embedding,
collection_name="my_store",
api_endpoint="https://...",
token="AstraCS:...",
)
Chat message history
from langchain_astradb import AstraDBChatMessageHistory
message_history = AstraDBChatMessageHistory(
session_id="test-session",
api_endpoint="https://...",
token="AstraCS:...",
)
LLM Cache
from langchain_astradb import AstraDBCache
cache = AstraDBCache(
api_endpoint="https://...",
token="AstraCS:...",
)
Semantic LLM Cache
from langchain_astradb import AstraDBSemanticCache
cache = AstraDBSemanticCache(
embedding=my_embedding,
api_endpoint="https://...",
token="AstraCS:...",
)
Document loader
from langchain_astradb import AstraDBLoader
loader = AstraDBLoader(
collection_name="my_collection",
api_endpoint="https://...",
token="AstraCS:...",
)
Store
from langchain_astradb import AstraDBStore
store = AstraDBStore(
collection_name="my_kv_store",
api_endpoint="https://...",
token="AstraCS:...",
)
Byte Store
from langchain_astradb import AstraDBByteStore
store = AstraDBByteStore(
collection_name="my_kv_store",
api_endpoint="https://...",
token="AstraCS:...",
)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
langchain_astradb-0.3.2.tar.gz
(22.9 kB
view details)
Built Distribution
File details
Details for the file langchain_astradb-0.3.2.tar.gz
.
File metadata
- Download URL: langchain_astradb-0.3.2.tar.gz
- Upload date:
- Size: 22.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4316f2c59402779a347a811e1b5470a0570348cb89baac17472d860b63188122 |
|
MD5 | cefe24aecd6428d8703743140b59da06 |
|
BLAKE2b-256 | 891d718b76926f0d5e616eab4a1961435faffacb7563100e982edf9e9738d01f |
File details
Details for the file langchain_astradb-0.3.2-py3-none-any.whl
.
File metadata
- Download URL: langchain_astradb-0.3.2-py3-none-any.whl
- Upload date:
- Size: 27.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 15afc5c0105e863e8f57bf8686490c00be47ed05e47d3263ad1577f2031c0dd5 |
|
MD5 | 4864503995bf6813772237b6df7e3ea7 |
|
BLAKE2b-256 | 01ca185796ba386e93e7596cf33843f555bf0f444187e6ca3ac07ed2bdcfe81f |