Skip to main content

Chroma Client.

Project description

Chroma logo

Chroma - the open-source embedding database.
This package is for the the Python HTTP client-only library for Chroma. This client connects to the Chroma Server. If that it not what you are looking for, you might want to check out the full library.

pip install chromadb-client # python http-client only library

To connect to your server and perform operations using the client only library, you can do the following:

import chromadb
from chromadb.config import Settings
# Example setup of the client to connect to your chroma server
client = chromadb.Client(Settings(chroma_api_impl="rest",
                                  chroma_server_host="localhost",
                                  chroma_server_port=8000))

collection = client.create_collection("all-my-documents")

collection.add(
    documents=["This is document1", "This is document2"],
    metadatas=[{"source": "notion"}, {"source": "google-docs"}], # filter on these!
    ids=["doc1", "doc2"], # unique for each doc
    embeddings = [[1.2, 2.1, ...], [1.2, 2.1, ...]]
)

results = collection.query(
    query_texts=["This is a query document"],
    n_results=2,
    # where={"metadata_field": "is_equal_to_this"}, # optional filter
    # where_document={"$contains":"search_string"}  # optional filter
)

License

Apache 2.0

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

chromadb-client-0.3.27.dev0.tar.gz (358.2 kB view details)

Uploaded Source

Built Distribution

chromadb_client-0.3.27.dev0-py3-none-any.whl (122.0 kB view details)

Uploaded Python 3

File details

Details for the file chromadb-client-0.3.27.dev0.tar.gz.

File metadata

  • Download URL: chromadb-client-0.3.27.dev0.tar.gz
  • Upload date:
  • Size: 358.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.3

File hashes

Hashes for chromadb-client-0.3.27.dev0.tar.gz
Algorithm Hash digest
SHA256 b21ea92bf65292d7f6e35065b871b7d18f6e5c5cf0a4838af9a2ef7120e94d11
MD5 81b143ec1536447c040168265f6c3fd9
BLAKE2b-256 4d6630ac44e51a4db6c38f6fc7d396d9412dd801147ac546f576a12b912a471c

See more details on using hashes here.

File details

Details for the file chromadb_client-0.3.27.dev0-py3-none-any.whl.

File metadata

File hashes

Hashes for chromadb_client-0.3.27.dev0-py3-none-any.whl
Algorithm Hash digest
SHA256 ff9db75ac21ba7a8e1a0299c754346f0694aa6c18865d802fa5058b9baf32c1e
MD5 7dc51d0daa0d466cf678a888971c9a59
BLAKE2b-256 dc525e9f0aa54592b30c68340c1b04835056b6e367d05c0180067f58b5649911

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