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
Built Distribution
File details
Details for the file llama_index_readers_chroma-0.2.0.tar.gz
.
File metadata
- Download URL: llama_index_readers_chroma-0.2.0.tar.gz
- Upload date:
- Size: 3.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.10.13 Darwin/23.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d30819fac543eba56dc3ba3f79a537990abb9f6500f9fc201fdd7b455e159b40 |
|
MD5 | bf3c0225e148d89e5482cec3ee22b39b |
|
BLAKE2b-256 | e1c2de899e64f4bba3ba3c70b1ef31584ff3298934714e70c76d84939c477788 |
File details
Details for the file llama_index_readers_chroma-0.2.0-py3-none-any.whl
.
File metadata
- Download URL: llama_index_readers_chroma-0.2.0-py3-none-any.whl
- Upload date:
- Size: 3.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.10.13 Darwin/23.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ee3af81045fe5c2820e69ac259fb2b36fbf4e59f96843869a3b655e4f57cd9a1 |
|
MD5 | 1e262af6bbffaf9a92a7f2d30702e2af |
|
BLAKE2b-256 | cd1dfbfc69b1af1ed6ae47259c715d549d28b0f2e58b11ec1ac93a2b27c5a746 |