CyborgVectorStore class, which conforms to the VectorStore interface from langchain-core.
Installation (Python Client SDK)
To use the LangChain integration with the CyborgDB Python Client SDK, you need to install thecyborgdb package with the langchain extra:
Installation (Embedded Library)
To install CyborgDB with LangChain support, you must install eithercyborgdb-core with the langchain extra. You can do this using pip:
To learn more about the differences between
cyborgdb and cyborgdb-core, refer to the Deployment Models Guide.Usage
To use CyborgDB with LangChain, you can import theCyborgVectorStore class from the cyborgdb_core.integrations.langchain module.
Key Classes
CyborgVectorStore
Implements the LangChain-compatible vector store interface. Supports:
.add_texts()/.add_documents().similarity_search()/.similarity_search_with_score().max_marginal_relevance_search().get_by_ids()and.delete()- Async variants (
.aadd_texts(),.asimilarity_search(), etc.) - Reversible document ID tracking
- Configurable distance metric (
cosine,euclidean,squared_euclidean)
DBConfig
Configuration object for defining the location of index data (memory, redis, postgres, etc.).