switched ollama model, added script to add pdfs to the vector store, tuned RAG parameters

This commit is contained in:
2026-02-11 15:21:26 +01:00
parent 4364ddcd71
commit 4879439f27
3 changed files with 29 additions and 7 deletions
+2 -1
View File
@@ -12,7 +12,7 @@ from local_rag import LocalRAG
# Initialize RAG once at startup
VECTORSTORE_PATH = "./vectorstore"
OLLAMA_MODEL = "mistral:7b"
OLLAMA_MODEL = "gpt-oss:20b"
rag = LocalRAG(vectorstore_path=VECTORSTORE_PATH, ollama_model=OLLAMA_MODEL)
app = FastAPI(title="Local RAG Chat", version="1.0.0")
@@ -32,6 +32,7 @@ class RetrievedChunk(BaseModel):
content: str
source: str
page: int | None
score: float | None = None # L2 distance from FAISS (lower = more similar)
class ChatResponse(BaseModel):