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

Uploaded Source

Built Distribution

chromadb_client-0.4.14.dev0-py3-none-any.whl (435.9 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for chromadb-client-0.4.14.dev0.tar.gz
Algorithm Hash digest
SHA256 c805624d335a4b9b724302a3f0e1cd17cd62f910baa7fb974aaed87bddf29886
MD5 7a9f484d68d849b7948b26c45828adc9
BLAKE2b-256 ea5b9c4669d4321abd10be324ba601509f2d8b3ffa09e3188cb852f2bc7eafaa

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chromadb_client-0.4.14.dev0-py3-none-any.whl
Algorithm Hash digest
SHA256 f1e808bb5c9ae504fdad7f9ff49b56eed15fa3b34e80d80f362df8b2e5045362
MD5 099acb674b78e70ded3fdfdd8223e0b9
BLAKE2b-256 fd19cc949bcce0f142ff28643583ca8e3c926bfe7de321db45d60d4257e8f59b

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