Skip to main content

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.0.tar.gz (11.6 kB view details)

Uploaded Source

Built Distribution

langchain_couchbase-0.2.0-py3-none-any.whl (14.7 kB view details)

Uploaded Python 3

File details

Details for the file langchain_couchbase-0.2.0.tar.gz.

File metadata

  • Download URL: langchain_couchbase-0.2.0.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

Hashes for langchain_couchbase-0.2.0.tar.gz
Algorithm Hash digest
SHA256 ca440a85ed9806fa69759ef12a38f5eb79a1a0ef5e544d4ac5a9c8c38a6675fa
MD5 8359803c131c962f087daff27ca562c0
BLAKE2b-256 2c4089f9ac2f92c7a65e8647e8999e6eb837f6f2f7e4c835996e4b6f3b8ebf13

See more details on using hashes here.

File details

Details for the file langchain_couchbase-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for langchain_couchbase-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a49384babd5054a7c2577c28367e13aba2a386f183dbad0b653889e62573b045
MD5 b0b8b272b789023fc167277c34573ee8
BLAKE2b-256 e1854a9a41066b6ab532701e4a54c5c219ecf1ba51669edb6e38172f1a31073f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page