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

Uploaded Source

Built Distribution

langchain_couchbase-0.1.0-py3-none-any.whl (13.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: langchain_couchbase-0.1.0.tar.gz
  • Upload date:
  • Size: 10.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.0 CPython/3.12.4

File hashes

Hashes for langchain_couchbase-0.1.0.tar.gz
Algorithm Hash digest
SHA256 df67aa6f12ab2def1068987cc7d9e7967bc295da783a405303d75c34f11f728a
MD5 54173684d54f577d06b7e7c3e51696f9
BLAKE2b-256 df7df5fe4df6cbd3812734337f1cb87fbf87900b18bf647c228fbd2426c93b4e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for langchain_couchbase-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 52049281973660068e5a2fdf78d67d0a4ce89317d6a7fa4c4ab285c7792be379
MD5 3abdd5bb37f73d6849a64d24b0bbe7e0
BLAKE2b-256 35d7bf0d3e9cc1fe0fa77f6edb81c45854eb647c1822d02d19e3e835ace03d72

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