From c7152d3f32b9cc622e1db31aba9852e9ebc6f4c3 Mon Sep 17 00:00:00 2001 From: Ryan Chen Date: Wed, 30 Jul 2025 20:27:03 -0400 Subject: [PATCH] Moving chromadb to env var --- main.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/main.py b/main.py index e22a907..b568c46 100644 --- a/main.py +++ b/main.py @@ -1,4 +1,5 @@ import logging +import os import argparse import chromadb @@ -11,7 +12,9 @@ from chunker import Chunker from dotenv import load_dotenv -client = chromadb.PersistentClient(path="/Users/ryanchen/Programs/raggr/chromadb") +load_dotenv() + +client = chromadb.PersistentClient(path=os.getenv("CHROMADB_PATH", "")) simba_docs = client.get_or_create_collection(name="simba_docs") feline_vet_lookup = client.get_or_create_collection(name="feline_vet_lookup") @@ -24,8 +27,6 @@ parser.add_argument( "--reindex", action="store_true", help="re-index the simba documents" ) -load_dotenv() - def chunk_data(texts: list[str], collection): # Step 2: Create chunks