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

Uploaded Source

Built Distribution

langchain_couchbase-0.1.1-py3-none-any.whl (13.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: langchain_couchbase-0.1.1.tar.gz
  • Upload date:
  • Size: 10.3 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.1.tar.gz
Algorithm Hash digest
SHA256 24a74775b90a9a3c9a41f4fb1ebef498f64da601108cd9e76d66a46718908c86
MD5 702c82165ec8a52a93bba99dbbc7ddff
BLAKE2b-256 1804c00e16c4052c2809850338d90ad65477509ccfcb20adfb7d96d22a461267

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for langchain_couchbase-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 cb143d82c2ea9eee80910d80f65ff12a686d2c5a422b4be115a61ac91b1882dd
MD5 e82432125dc70b9c832b5437914b14b3
BLAKE2b-256 6221b8d56d01ba135f67533efce241dd9ef31bc5bf4a1114d33674a974160b38

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