Skip to main content

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


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.3.tar.gz (23.2 kB view details)

Uploaded Source

Built Distribution

langchain_astradb-0.3.3-py3-none-any.whl (27.7 kB view details)

Uploaded Python 3

File details

Details for the file langchain_astradb-0.3.3.tar.gz.

File metadata

  • Download URL: langchain_astradb-0.3.3.tar.gz
  • Upload date:
  • Size: 23.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for langchain_astradb-0.3.3.tar.gz
Algorithm Hash digest
SHA256 f9a996ec4bef134896195430adeb7f264389c368a03d2ea91356837e8ddde091
MD5 606a26d287440cc2f01be492007e6680
BLAKE2b-256 b039768a1328b038010344677c4438c146a94a6aea04cbfc5756ea9c7d85b6db

See more details on using hashes here.

File details

Details for the file langchain_astradb-0.3.3-py3-none-any.whl.

File metadata

File hashes

Hashes for langchain_astradb-0.3.3-py3-none-any.whl
Algorithm Hash digest
SHA256 39deef1253947ef1bfaf3c27881ecdf07621d96c2cf37814aed9e506a9bee217
MD5 a08f03159de75d3d8e46495fbdc2ccf9
BLAKE2b-256 45ff08a49c47b91e7ab75012ce99144020f6001bb88032244d579ca0f582f53f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page