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

Uploaded Source

Built Distribution

langchain_astradb-0.2.0-py3-none-any.whl (25.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: langchain_astradb-0.2.0.tar.gz
  • Upload date:
  • Size: 21.1 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.2.0.tar.gz
Algorithm Hash digest
SHA256 63e7ca2327c7fdb4a434903aad3c3b1413f3522dd77cd01f825513937412ed17
MD5 b360b27f7865d03304405c242309cecc
BLAKE2b-256 7c063ce727572bd5c1472f503bb678792e3539f2bff595a39984dc14bf1c3780

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for langchain_astradb-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e4d9e9ecf44eeb95d4630b6607caa000b827c87a5b6d5b716b028bb5f4713c08
MD5 69c0f300738d04b49d8dbc7195c90189
BLAKE2b-256 e12d09e50395958dbdf5e154ae0562bb8c77a9337f0a542d34a8878ee257f593

See more details on using hashes here.

Provenance

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