langchain/libs/partners/astradb
Stefano Lottini 6d863bed51
partner[minor]: Astra DB clients identify themselves as coming through LangChain package (#18131)
**Description**

This PR sets the "caller identity" of the Astra DB clients used by the
integration plugins (`AstraDBChatMessageHistory`, `AstraDBStore`,
`AstraDBByteStore` and, pending #17767 , `AstraDBVectorStore`). In this
way, the requests to the Astra DB Data API coming from within LangChain
are identified as such (the purpose is anonymous usage stats to best
improve the Astra DB service).
2024-02-28 17:13:22 -05:00
..
langchain_astradb partner[minor]: Astra DB clients identify themselves as coming through LangChain package (#18131) 2024-02-28 17:13:22 -05:00
scripts astradb: bootstrapping Astra DB as Partner Package (#16875) 2024-02-15 15:50:59 -08:00
tests astradb: Add AstraDBChatMessageHistory to langchain-astradb package (#17732) 2024-02-25 18:14:49 -08:00
.gitignore astradb: bootstrapping Astra DB as Partner Package (#16875) 2024-02-15 15:50:59 -08:00
LICENSE astradb: bootstrapping Astra DB as Partner Package (#16875) 2024-02-15 15:50:59 -08:00
Makefile astradb: bootstrapping Astra DB as Partner Package (#16875) 2024-02-15 15:50:59 -08:00
poetry.lock astradb: Add AstraDBChatMessageHistory to langchain-astradb package (#17732) 2024-02-25 18:14:49 -08:00
pyproject.toml astradb: Add AstraDBChatMessageHistory to langchain-astradb package (#17732) 2024-02-25 18:14:49 -08:00
README.md astradb: Add AstraDBChatMessageHistory to langchain-astradb package (#17732) 2024-02-25 18:14:49 -08:00

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.