UI and chatbot updates
This commit is contained in:
@@ -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", [])
|
||||
|
||||
Reference in New Issue
Block a user