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
chromarepository-1.0.4.tar.gz
(9.8 kB
view hashes)
Built Distribution
Close
Hashes for ChromaRepository-1.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fa1bccdb0847c253c348420b2d0b1937788213c85d7ec0337421af422de2d7a0 |
|
MD5 | 85e6436e899d6ebfef61a2ad08847959 |
|
BLAKE2b-256 | 5bd9abc079b07662d081183808e5d30a7e16984975f5927e955e8faf25a54af9 |