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
Built Distribution
File details
Details for the file chromadb_client-0.5.4.dev0.tar.gz
.
File metadata
- Download URL: chromadb_client-0.5.4.dev0.tar.gz
- Upload date:
- Size: 31.2 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4888d348cf4f74c19dc47fd3602d1bfb3956401014d833c4287018c3c0dd1174 |
|
MD5 | 6d6e4f1820041fe4a1f1f26d3905d1d8 |
|
BLAKE2b-256 | b592c0c63c752228756e307f5f46374c7245b2ba3877b858cba6fe1bb8ad4508 |
File details
Details for the file chromadb_client-0.5.4.dev0-py3-none-any.whl
.
File metadata
- Download URL: chromadb_client-0.5.4.dev0-py3-none-any.whl
- Upload date:
- Size: 557.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7ccc2ab2b275fffd2730dc6c30fc7fc9b5b1ab467ec04839f43fc9b737279519 |
|
MD5 | b75ef4c877232ab57088926e3c5da053 |
|
BLAKE2b-256 | 44ea5b7420db86b876fc3703326bdb8d1f939a80bd2f830d667ca8d184cce47d |