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.

Note. For a short transitional period, only some of the Astra DB integration classes are contained in this package (the remaining ones being still in langchain-community). In a short while, and surely by version 0.2 of LangChain, all of the Astra DB support will be removed from langchain-community and included in this package.

Installation and Setup

Installation of this partner package:

pip install langchain-astradb

Integrations overview

Vector Store

from langchain_astradb import AstraDBVectorStore

my_store = AstraDBVectorStore(
  embedding=my_embeddings,
  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="...",
    token="...",
)

Store

from langchain_astradb import AstraDBStore
store = AstraDBStore(
    collection_name="my_kv_store",
    api_endpoint="...",
    token="..."
)

Byte Store

from langchain_astradb import AstraDBByteStore
store = AstraDBByteStore(
    collection_name="my_kv_store",
    api_endpoint="...",
    token="..."
)

Reference

See the LangChain docs page for a more detailed listing.

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

Uploaded Source

Built Distribution

langchain_astradb-0.1.0-py3-none-any.whl (25.4 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for langchain_astradb-0.1.0.tar.gz
Algorithm Hash digest
SHA256 c8a3426c9daa2beeec2dc7a718186b0b9c388082e9543e0bc07363712cc3b947
MD5 e8510878492958bed560d81758dd69e4
BLAKE2b-256 32f80703c72b986c677b3b28635077a0d809a2bc44a355f497e183914bcc1f63

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for langchain_astradb-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c6686089da343fce8c31e36c9162323e88888300b09d56b72347a19449d7361f
MD5 4e455ebdca5b0205fe30bddfffd28f27
BLAKE2b-256 3e4ae139b985f805422c492d961ec16fc10e90c2488506aa6094bcff0e65e4bb

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