Chroma Client.
Project description
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
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-0.5.20.tar.gz
(33.7 MB
view details)
Built Distribution
File details
Details for the file chromadb_client-0.5.20.tar.gz
.
File metadata
- Download URL: chromadb_client-0.5.20.tar.gz
- Upload date:
- Size: 33.7 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b8ff27686222b5e0d5c2c0d13934d844cb8ff1a620fde8dde57c23375fc44d4e |
|
MD5 | 5e74b6ca9dd22be5d1558ed5d6e5d2a7 |
|
BLAKE2b-256 | 59e0d89182666a6fc7be431eb80b81b3df874d66df4f93b12a93f5efc6f5eaf3 |
File details
Details for the file chromadb_client-0.5.20-py3-none-any.whl
.
File metadata
- Download URL: chromadb_client-0.5.20-py3-none-any.whl
- Upload date:
- Size: 615.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a7258df1eafa4a29a0bf75c52474ee5766a3b8c6e302e50e5f315ab5df24d106 |
|
MD5 | 7b44e1232e16c96c9b92990f38985c6e |
|
BLAKE2b-256 | e1228c8671361f90d00c42c1c6bd019b4c7cba96aed66b9a8cfdd9132b72ccff |