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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for langchain_couchbase-0.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | fecf3de7e370a3dc0cc519385abe975684b005cdd723873dc2580b561a1426e9 |
|
MD5 | 15b4236028ac687b0283e606eef409b2 |
|
BLAKE2b-256 | 358a7510b20606ad8e2c56d5fcb286e4669a8e0a5782b4eb6ad98e44ab6518d5 |
Close
Hashes for langchain_couchbase-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4a5403932195642e49980f217a27d47e0d3818ff7439023f78aad6618b5d0dfa |
|
MD5 | 1095f10a88d0bf3fe937fcc889ecf12e |
|
BLAKE2b-256 | b7ae0375d28338c8c19ae01d1725292910f4efd47c0aa8b8e66ea027b9b618c9 |