UI and chatbot updates

This commit is contained in:
2026-10-08 16:08:00 +02:00
parent 30fd55da21
commit f68d7a6e25
9 changed files with 62 additions and 32 deletions
+5
View File
@@ -8,11 +8,15 @@ from pathlib import Path
from fastapi import FastAPI, HTTPException
from fastapi.responses import HTMLResponse
from fastapi.staticfiles import StaticFiles
from dotenv import load_dotenv
from pydantic import BaseModel
from local_rag import LocalRAG
from personas import DEFAULT_PERSONA, PERSONAS, PUBLIC_FIELDS
# OPENAI_API_KEY may come from a local .env (git-ignored); an exported variable takes precedence.
load_dotenv()
OLLAMA_MODEL = "gemma4:12b"
OPENAI_MODEL = "gpt-6-luna"
# One RAG instance per (LLM provider, vector store), for on-the-fly provider switching.
@@ -101,6 +105,7 @@ def chat(request: ChatRequest):
request.message.strip(),
chat_history=chat_history,
system_prompt=persona["system_prompt"],
tool_description=persona.get("tool_description"),
)
answer = result["answer"]
retrieved = result.get("retrieved", [])