mirror of
https://github.com/hwchase17/langchain
synced 2024-11-08 07:10:35 +00:00
22af93d851
This addresses #6291 adding support for using Cassandra (and compatible databases, such as DataStax Astra DB) as a [Vector Store](https://cwiki.apache.org/confluence/display/CASSANDRA/CEP-30%3A+Approximate+Nearest+Neighbor(ANN)+Vector+Search+via+Storage-Attached+Indexes). A new class `Cassandra` is introduced, which complies with the contract and interface for a vector store, along with the corresponding integration test, a sample notebook and modified dependency toml. Dependencies: the implementation relies on the library `cassio`, which simplifies interacting with Cassandra for ML- and LLM-oriented workloads. CassIO, in turn, uses the `cassandra-driver` low-lever drivers to communicate with the database. The former is added as optional dependency (+ in `extended_testing`), the latter was already in the project. Integration testing relies on a locally-running instance of Cassandra. [Here](https://cassio.org/more_info/#use-a-local-vector-capable-cassandra) a detailed description can be found on how to compile and run it (at the time of writing the feature has not made it yet to a release). During development of the integration tests, I added a new "fake embedding" class for what I consider a more controlled way of testing the MMR search method. Likewise, I had to amend what looked like a glitch in the behaviour of `ConsistentFakeEmbeddings` whereby an `embed_query` call would have bypassed storage of the requested text in the class cache for use in later repeated invocations. @dev2049 might be the right person to tag here for a review. Thank you! --------- Co-authored-by: rlm <pexpresss31@gmail.com> |
||
---|---|---|
.. | ||
cassettes | ||
docarray | ||
docker-compose | ||
fixtures | ||
__init__.py | ||
conftest.py | ||
fake_embeddings.py | ||
test_alibabacloud_opensearch.py | ||
test_analyticdb.py | ||
test_annoy.py | ||
test_atlas.py | ||
test_awadb.py | ||
test_azuresearch.py | ||
test_cassandra.py | ||
test_chroma.py | ||
test_clickhouse.py | ||
test_deeplake.py | ||
test_elasticsearch.py | ||
test_faiss.py | ||
test_hologres.py | ||
test_lancedb.py | ||
test_milvus.py | ||
test_mongodb_atlas.py | ||
test_myscale.py | ||
test_opensearch.py | ||
test_pgvector.py | ||
test_pinecone.py | ||
test_qdrant.py | ||
test_redis.py | ||
test_singlestoredb.py | ||
test_tair.py | ||
test_vectara.py | ||
test_weaviate.py | ||
test_zilliz.py |