An integration package connecting Couchbase and LangChain
Project description
langchain-couchbase
This package contains the LangChain integration with Couchbase
Installation
pip install -U langchain-couchbase
Usage
The CouchbaseVectorStore
class exposes the connection to the Couchbase vector store.
from langchain_couchbase.vectorstores import CouchbaseVectorStore
from couchbase.cluster import Cluster
from couchbase.auth import PasswordAuthenticator
from couchbase.options import ClusterOptions
from datetime import timedelta
auth = PasswordAuthenticator(username, password)
options = ClusterOptions(auth)
connect_string = "couchbases://localhost"
cluster = Cluster(connect_string, options)
# Wait until the cluster is ready for use.
cluster.wait_until_ready(timedelta(seconds=5))
embeddings = OpenAIEmbeddings()
vectorstore = CouchbaseVectorStore(
cluster=cluster,
bucket_name="",
scope_name="",
collection_name="",
embedding=embeddings,
index_name="vector-search-index",
)
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_couchbase-0.2.2.tar.gz
(11.6 kB
view details)
Built Distribution
File details
Details for the file langchain_couchbase-0.2.2.tar.gz
.
File metadata
- Download URL: langchain_couchbase-0.2.2.tar.gz
- Upload date:
- Size: 11.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1b09508d1e1d6af9bd0bf291d9231a268aed561a0abd52c67912e89c2ce1f877 |
|
MD5 | 2307dff3e8724fe318bd8cdb1ff3916e |
|
BLAKE2b-256 | 2b43620f068e20ce92ef3e93b8deb9fe8810a160d284c5c3dcc9b8a224fb0d6b |
File details
Details for the file langchain_couchbase-0.2.2-py3-none-any.whl
.
File metadata
- Download URL: langchain_couchbase-0.2.2-py3-none-any.whl
- Upload date:
- Size: 14.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4d0bc8876c5c448dfca3eed42fd076f25a92228372a926cfff369b9f5283a290 |
|
MD5 | 91e6998cdf9a132ff46aa780901ba82c |
|
BLAKE2b-256 | a582fb33b07fa7dc37cb5fb60ed146cb609bdaf6a1a5c66463dc1a493df5e1e1 |