Skip to main content

An integration package connecting Couchbase and GigaChain

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

gigachain_couchbase-0.1.1.tar.gz (10.4 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: gigachain_couchbase-0.1.1.tar.gz
  • Upload date:
  • Size: 10.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.11.6 Darwin/23.5.0

File hashes

Hashes for gigachain_couchbase-0.1.1.tar.gz
Algorithm Hash digest
SHA256 66d5f3d95ff0305705f3087865fee1bccd537a4dec6032049cf40b3f85bfb26f
MD5 93afa84fa378ab818f1d2cd37b2dc6a4
BLAKE2b-256 58a77ec846251c4b82b1796207d906e04133d5e3b5fccb8edff1dd57460d1f46

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gigachain_couchbase-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 50d5a66f950b0fb0bdc334f66d3f902bea4c60eb834b7536bfdee9a43232cdb6
MD5 383fdbaedd5b53db186b3b67c29f038f
BLAKE2b-256 51c20a5de79e5eeef82110a95bbb807d6b03ab38e65e737c4f145322a8a0f53e

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