switched ollama model, added script to add pdfs to the vector store, tuned RAG parameters
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Add all PDFs under a folder to the RAG vector store. Run from project root."""
|
||||
import shutil
|
||||
from pathlib import Path
|
||||
|
||||
from local_rag import LocalRAG
|
||||
@@ -8,6 +9,10 @@ DATA_ROOT = Path("/Users/Philipp/Desktop/workspace/python/gpt_publikationen/data
|
||||
VECTORSTORE_PATH = "./vectorstore"
|
||||
|
||||
if __name__ == "__main__":
|
||||
if Path(VECTORSTORE_PATH).exists():
|
||||
shutil.rmtree(VECTORSTORE_PATH)
|
||||
print(f"Cleared existing vector store: {VECTORSTORE_PATH}")
|
||||
|
||||
pdfs = sorted(p for p in DATA_ROOT.rglob("*") if p.suffix.lower() == ".pdf")
|
||||
print(f"Found {len(pdfs)} PDF(s) under {DATA_ROOT}")
|
||||
if not pdfs:
|
||||
|
||||
Reference in New Issue
Block a user