Skip to main content

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 from Langchain

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 like add, 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 of ChromaRepository.py which can be used to learn how to use the package.

License

  • The code is provided under the MIT License.

Project details


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)

Uploaded Source

Built Distribution

ChromaRepository-1.0.4-py3-none-any.whl (2.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page