You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
langchain/libs/partners/astradb
Stefano Lottini 5240ecab99
astradb: bootstrapping Astra DB as Partner Package (#16875)
**Description:** This PR introduces a new "Astra DB" Partner Package.

So far only the vector store class is _duplicated_ there, all others
following once this is validated and established.

Along with the move to separate package, incidentally, the class name
will change `AstraDB` => `AstraDBVectorStore`.

The strategy has been to duplicate the module (with prospected removal
from community at LangChain 0.2). Until then, the code will be kept in
sync with minimal, known differences (there is a makefile target to
automate drift control. Out of convenience with this check, the
community package has a class `AstraDBVectorStore` aliased to `AstraDB`
at the end of the module).

With this PR several bugfixes and improvement come to the vector store,
as well as a reshuffling of the doc pages/notebooks (Astra and
Cassandra) to align with the move to a separate package.

**Dependencies:** A brand new pyproject.toml in the new package, no
changes otherwise.

**Twitter handle:** `@rsprrs`

---------

Co-authored-by: Christophe Bornet <cbornet@hotmail.com>
Co-authored-by: Erick Friis <erick@langchain.dev>
8 months ago
..
langchain_astradb astradb: bootstrapping Astra DB as Partner Package (#16875) 8 months ago
scripts astradb: bootstrapping Astra DB as Partner Package (#16875) 8 months ago
tests astradb: bootstrapping Astra DB as Partner Package (#16875) 8 months ago
.gitignore astradb: bootstrapping Astra DB as Partner Package (#16875) 8 months ago
LICENSE astradb: bootstrapping Astra DB as Partner Package (#16875) 8 months ago
Makefile astradb: bootstrapping Astra DB as Partner Package (#16875) 8 months ago
README.md astradb: bootstrapping Astra DB as Partner Package (#16875) 8 months ago
poetry.lock astradb: bootstrapping Astra DB as Partner Package (#16875) 8 months ago
pyproject.toml astradb: bootstrapping Astra DB as Partner Package (#16875) 8 months ago

README.md

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.vectorstores import AstraDBVectorStore

my_store = AstraDBVectorStore(
  embedding=my_embeddings,
  collection_name="my_store",
  api_endpoint="https://...",
  token="AstraCS:...",
)

Reference

See the LangChain docs page for a more detailed listing.