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
# Example setup of the client to connect to your chroma server
client = chromadb.HttpClient(host="localhost", 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.4.1.dev0.tar.gz (623.6 kB view details)

Uploaded Source

Built Distribution

chromadb_client-0.4.1.dev0-py3-none-any.whl (397.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: chromadb-client-0.4.1.dev0.tar.gz
  • Upload date:
  • Size: 623.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for chromadb-client-0.4.1.dev0.tar.gz
Algorithm Hash digest
SHA256 2feff7be97f6854fa980bff115c940a116626fe285a9f1df009c239e4d81f0a0
MD5 12e3753871a6bfdefa4923604f22ddf8
BLAKE2b-256 650a2e0afff989dd10ad67899e1cda9e0826dd2e559b7ce107674ac14e72071c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chromadb_client-0.4.1.dev0-py3-none-any.whl
Algorithm Hash digest
SHA256 595da78da03b1dcdb76ec193a8fca6d1bf1347fb978c3f9836f0caacccf1d651
MD5 8a0545da35b14dff593c5e0c4293d89f
BLAKE2b-256 35c9b328d01739a159cd571952810728c230f4a19e56379d7c8b0bc321d41585

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