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.3.0.tar.gz (3.1 kB view details)

Uploaded Source

Built Distribution

File details

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

File metadata

File hashes

Hashes for llama_index_readers_chroma-0.3.0.tar.gz
Algorithm Hash digest
SHA256 fdf844eec0307368b802feb221090dbc6967c1187d5c8eb596839c3e3cfc8448
MD5 2189cac3454f1b77430420a830985df5
BLAKE2b-256 a10eca94ad5a15860575757c17ade189b0bb9a569983bdd5a279c6e161b9bf1d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for llama_index_readers_chroma-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 caa049c9955b69e5b895fa16e79c4821ad073d670ce5f4fda1ab23feeb5debf4
MD5 c525fca3dbaa0cc93f233769d6583918
BLAKE2b-256 d5be35f1bc09a90db8741536172c5729aace167800ccc3cf25f35f9497f34ac5

See more details on using hashes here.

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