Spaces:
Runtime error
Runtime error
Commit ·
abdcaec
1
Parent(s): 31fe64f
update
Browse filesFiles changed (2)
22 unmodified lines2324252627282930125 unmodified lines15615715815916016116216316416516616716816917017117217317417517622 unmodified linesfrom utils.RouteQuery import route_queryfrom utils.RAGAdvanced import rag_advancedimport threadingfrom fastapi.responses import FileResponsefrom fastapi import HTTPException
load_dotenv()
125 unmodified lines
return ChatResponse(reply= result)
@app.get("/download-logs")def download_logs(key: str = None): # Verify access using your groq key as the password if not key or key != os.getenv("groq_api_key"): raise HTTPException(status_code=401, detail="Unauthorized") if not LOGS_FILE.exists(): raise HTTPException(status_code=404, detail="No logs found yet.") return FileResponse( path=LOGS_FILE, filename="all_chats.csv", media_type="text/csv" )
# Mount the frontend client directory to serve static assets at /CLIENT_DIR = Path(__file__).resolve().parent.parent / "client"app.mount("/", StaticFiles(directory=CLIENT_DIR, html=True), name="static")server/__pycache__/main.cpython-310.pyc
server/main.py+17