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.1.tar.gz
(22.2 kB
view details)
Built Distribution
File details
Details for the file langchain_astradb-0.3.1.tar.gz
.
File metadata
- Download URL: langchain_astradb-0.3.1.tar.gz
- Upload date:
- Size: 22.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ebb467d3280d4a80514e90a715597695b6ce7d4d29269c5baf2427fb3cdc751e |
|
MD5 | f7a556062cb29e3c10e34c66f4a3af8e |
|
BLAKE2b-256 | c7888662e63a9d551de12d8d28bf5895289fb6a31c93fd7412e944642f57cbaf |
File details
Details for the file langchain_astradb-0.3.1-py3-none-any.whl
.
File metadata
- Download URL: langchain_astradb-0.3.1-py3-none-any.whl
- Upload date:
- Size: 26.5 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 | 067c1f062c2d6cfce8f6f7b0f959616bb7fde483db2909aa0fd4d3a53ca7e8d1 |
|
MD5 | 9465fd846a2f556350a0c78320987385 |
|
BLAKE2b-256 | fece9a82161be0bd81f6152dcff6f1a9a7a5c3386ff9654cea5c2a4c4bc9cc28 |