Skip to main content

Chroma Client.

Project description

Chroma logo

Chroma - the open-source embedding database.
This package is for 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


Release history Release notifications | RSS feed

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-1.0.15.tar.gz (39.2 MB view details)

Uploaded Source

Built Distribution

chromadb_client-1.0.15-py3-none-any.whl (635.3 kB view details)

Uploaded Python 3

File details

Details for the file chromadb_client-1.0.15.tar.gz.

File metadata

  • Download URL: chromadb_client-1.0.15.tar.gz
  • Upload date:
  • Size: 39.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for chromadb_client-1.0.15.tar.gz
Algorithm Hash digest
SHA256 945e80971a40dc6fd66c8494f2db089baf81dfb3e34b8938d6999a0c54571704
MD5 d7ab1d35309ae54cf7ffd9072c224eb9
BLAKE2b-256 69957a8eb069e4316f0be4626f54330ab633f61372171473fa07e0196c261dad

See more details on using hashes here.

File details

Details for the file chromadb_client-1.0.15-py3-none-any.whl.

File metadata

File hashes

Hashes for chromadb_client-1.0.15-py3-none-any.whl
Algorithm Hash digest
SHA256 ad04535f535c99e37941fae8b5331bbdc8cfa542821529c73561af17b852a946
MD5 265acdc2e4421bcf5fabf4878450012a
BLAKE2b-256 2b86a47d542366d3ce547e25629da546210e3c2218b5678ad794671164bf4821

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page