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.17.dev0.tar.gz (13.5 MB view details)

Uploaded Source

Built Distribution

chromadb_client-0.4.17.dev0-py3-none-any.whl (494.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: chromadb-client-0.4.17.dev0.tar.gz
  • Upload date:
  • Size: 13.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for chromadb-client-0.4.17.dev0.tar.gz
Algorithm Hash digest
SHA256 0618c507744d924d29c4931dba1bda652042a33c8d7ced2ab82d48a993d0391c
MD5 4e0ad09a391976a682a5f556d9dff728
BLAKE2b-256 add72973e955d7377affcd5a4f4850e967acc610daf82196da5f2ee22ba3e989

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chromadb_client-0.4.17.dev0-py3-none-any.whl
Algorithm Hash digest
SHA256 b810f59a88c27ec4c603192dd5674c447a8a5618d8ff16917e0e7e4dfc507918
MD5 0060b55cb6733f8d1297d189d3327d92
BLAKE2b-256 29a410a32691c0e2669740873897adc0dfcd8eb6ac36510bee7f736e15d8674a

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