ChromaRepository is a wrapper around Chroma Vector Repository
Project description
ChromaRepository.py
Purpose
ChromaRepository.py
provides functionality to interact with a Chroma collection, including adding, updating, deleting, and querying documents.
Dependencies
- The file imports modules like
ChromaDb
,Embeddings
from OpenAI and Ollama,Document
, and others from various sources including many packages fromLangchain
Functionality
- The file contains functions for adding documents with or without metadata, updating documents, deleting documents, and querying the Chroma collection based on different criteria.
Classes and Interfaces
- The file defines a class
ChromaRepository
that encapsulates the functionality related to interacting with the Chroma collection. - the project also defines many retriever strategies using the following classes:
SimilaritySearchRetriever
MultiSearchRetriever
SmallChunksSearchRetriever
Methods
- The class
ChromaRepository
contains methods likeadd
,update_by_id
,delete_by_ids
,get_all
,getall_by_ids
, and more for managing the Chroma collection but also using the retrievers to gather data from the vector store.
Testing
- Unit tests are available in
test_ChromaRepository.py
covering various functionalities ofChromaRepository.py
which can be used to learn how to use the package.
License
- The code is provided under the MIT 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 chromarepository-1.0.4.tar.gz
.
File metadata
- Download URL: chromarepository-1.0.4.tar.gz
- Upload date:
- Size: 9.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 215981d0ca310e7258168058a700d071983a7622001252706b84236aa78897aa |
|
MD5 | 6bff239b00b514e8f6a8e8cfe9d3fd2e |
|
BLAKE2b-256 | 97538055b2139f414199fe84aa62ea776e54ff58bb0d48f7c54727ed73efbcac |
File details
Details for the file ChromaRepository-1.0.4-py3-none-any.whl
.
File metadata
- Download URL: ChromaRepository-1.0.4-py3-none-any.whl
- Upload date:
- Size: 2.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fa1bccdb0847c253c348420b2d0b1937788213c85d7ec0337421af422de2d7a0 |
|
MD5 | 85e6436e899d6ebfef61a2ad08847959 |
|
BLAKE2b-256 | 5bd9abc079b07662d081183808e5d30a7e16984975f5927e955e8faf25a54af9 |