Remove hardcoded PG password fallbacks — require PG_DSN env var in all scripts
This commit is contained in:
@@ -10,7 +10,10 @@ from pathlib import Path
|
||||
from sentence_transformers import SentenceTransformer
|
||||
|
||||
CHROMA_SQLITE = str(Path.home() / "aaronai" / "db" / "chroma.sqlite3")
|
||||
PG_DSN = "dbname=aaronai user=aaronai password=aaronai_db_password host=localhost"
|
||||
import os
|
||||
PG_DSN = os.getenv("PG_DSN")
|
||||
if not PG_DSN:
|
||||
raise RuntimeError("PG_DSN environment variable not set")
|
||||
|
||||
print("Loading embedding model...")
|
||||
embedder = SentenceTransformer("all-MiniLM-L6-v2")
|
||||
|
||||
Reference in New Issue
Block a user