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

Uploaded Source

Built Distribution

langchain_couchbase-0.0.1-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for langchain_couchbase-0.0.1.tar.gz
Algorithm Hash digest
SHA256 fecf3de7e370a3dc0cc519385abe975684b005cdd723873dc2580b561a1426e9
MD5 15b4236028ac687b0283e606eef409b2
BLAKE2b-256 358a7510b20606ad8e2c56d5fcb286e4669a8e0a5782b4eb6ad98e44ab6518d5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for langchain_couchbase-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4a5403932195642e49980f217a27d47e0d3818ff7439023f78aad6618b5d0dfa
MD5 1095f10a88d0bf3fe937fcc889ecf12e
BLAKE2b-256 b7ae0375d28338c8c19ae01d1725292910f4efd47c0aa8b8e66ea027b9b618c9

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