Skip to main content

llama-index readers chroma integration

Project description

LlamaIndex Readers Integration: Chroma

Overview

Chroma Reader is a tool designed to retrieve documents from existing persisted Chroma collections. Chroma is a framework for managing document collections and their associated embeddings efficiently.

Installation

You can install Chroma Reader via pip:

pip install llama-index-readers-chroma

Usage

from llama_index.core.schema import Document
from llama_index.readers.chroma import ChromaReader

# Initialize ChromaReader with the collection name and optional parameters
reader = ChromaReader(
    collection_name="<Your Collection Name>",
    persist_directory="<Directory Path>",  # Optional: Directory where the collection is persisted
    chroma_api_impl="rest",  # Optional: Chroma API implementation (default: "rest")
    chroma_db_impl=None,  # Optional: Chroma DB implementation (default: None)
    host="localhost",  # Optional: Host for Chroma DB (default: "localhost")
    port=8000,  # Optional: Port for Chroma DB (default: 8000)
)

# Load data from Chroma collection
documents = reader.load_data(
    query_embedding=None,  # Provide query embedding if searching by embeddings
    limit=10,  # Number of results to retrieve
    where=None,  # Filter condition for metadata
    where_document=None,  # Filter condition for document
    query=["search term"],  # Provide query text if searching by text
)

This loader is designed to be used as a way to load data into LlamaIndex and/or subsequently used as a Tool in a LangChain Agent.

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

llama_index_readers_chroma-0.4.1.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

llama_index_readers_chroma-0.4.1-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file llama_index_readers_chroma-0.4.1.tar.gz.

File metadata

File hashes

Hashes for llama_index_readers_chroma-0.4.1.tar.gz
Algorithm Hash digest
SHA256 ae8569411dcfb2adf67e5011c0cd4834e84f72ee5c7b989924e9a91376ef8f39
MD5 4782b47320d737640ee01c7951542fe0
BLAKE2b-256 86da34b7d5a3b2fd06198899c4b2ba25891a98ae9fe11b019725f5a008b65d01

See more details on using hashes here.

File details

Details for the file llama_index_readers_chroma-0.4.1-py3-none-any.whl.

File metadata

File hashes

Hashes for llama_index_readers_chroma-0.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e653cbe0393a2e3959aff1d282b08064028787c67c4f8935a39daf15f5734091
MD5 2a45386bf79a618f6e0693054e57be53
BLAKE2b-256 588f971603552e7dae8deb498da00caa86dbfb437cc5dfe6e6c0e208ab4e4a09

See more details on using hashes here.

Supported by

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