ChromaEmbeddingsDB Plugin
Overview
The ChromaEmbeddingsDB plugin integrates with the ChromaDB database to provide a robust solution for managing and querying embeddings. This plugin extends the abstract EmbeddingsDB class, allowing you to store, retrieve, and query embeddings efficiently using ChromaDB’s capabilities.
This plugin is meant to be used by other specialized plugins such as:
- https://github.com/TigreGotico/ovos-face-embeddings-plugin
- https://github.com/TigreGotico/ovos-voice-embeddings-plugin
- https://github.com/TigreGotico/ovos-gguf-embeddings-plugin
Features
- Add Embeddings: Store embeddings with associated keys.
- Retrieve Embeddings: Fetch embeddings by their keys.
- Delete Embeddings: Remove embeddings by their keys.
- Query Embeddings: Find the closest embeddings to a given query, with support for cosine distance.
Example
Here is a full example demonstrating the basic usage of ChromaEmbeddingsDB.
import numpy as np
from chroma_embeddings_db import ChromaEmbeddingsDB
# Initialize the database
db = ChromaEmbeddingsDB(path="path_to_chromadb_storage")
# Add embeddings
embedding1 = np.array([0.1, 0.2, 0.3])
embedding2 = np.array([0.4, 0.5, 0.6])
db.add_embeddings("user1", embedding1)
db.add_embeddings("user2", embedding2)
# Retrieve and print embeddings
print(db.get_embedding("user1"))
print(db.get_embedding("user2"))
# Query embeddings
query_embedding = np.array([0.2, 0.3, 0.4])
results = db.query(query_embedding, top_k=2)
print(results)
# Delete an embedding
db.delete_embedding("user1")
Ensure that the path provided to the
ChromaEmbeddingsDBconstructor is accessible and writable.
Acknowledgements
Metadata
Release files for ovos-chromadb-embeddings-plugin 0.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ovos-chromadb-embeddings-plugin-0.0.0.tar.gz | 4.1 kB | Without provenance | Details for ovos-chromadb-embeddings-plugin-0.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ovos_chromadb_embeddings_plugin-0.0.0-py3-none-any.whl | Python 3 | none | any | Details for ovos_chromadb_embeddings_plugin-0.0.0-py3-none-any.whl |
Total release size: 8.5 kB
Release files / ovos-chromadb-embeddings-plugin-0.0.0.tar.gz
| Download URL | ovos-chromadb-embeddings-plugin-0.0.0.tar.gz |
|---|---|
| Size | 4.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1fbc58a17071e9d62751751189b3310932ccf3c271fc1773ccf098aeba837cb9
|
|
BLAKE2b-256 checksum How to use checksums |
451e0fdaa673c39a5c8835ba4b74bf1a7dae53b7ccae9bff3bcff4584256aff4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.9.20
|
Release files / ovos_chromadb_embeddings_plugin-0.0.0-py3-none-any.whl
| Download URL | ovos_chromadb_embeddings_plugin-0.0.0-py3-none-any.whl |
|---|---|
| Size | 4.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
210ed1ec21674db02de954390ad0fe6c1512e88abfd6fbb9e248e3cb92ca32b4
|
|
BLAKE2b-256 checksum How to use checksums |
3a5bc2836b0962f174ed98a757c54844a3d81b69e8f7993b5dba2ea670af1f1f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.9.20
|
Security for ovos-chromadb-embeddings-plugin 0.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.