From b5015a8c4c7a0102343f42a1a817ac20255d5e4d Mon Sep 17 00:00:00 2001 From: Sebarocks Date: Wed, 6 Aug 2025 00:40:42 -0400 Subject: [PATCH] ruta serve chat --- app.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app.py b/app.py index acd36ba..297a443 100644 --- a/app.py +++ b/app.py @@ -21,8 +21,13 @@ async def serve_frontend(request): """Serve the frontend index.html file""" return FileResponse(os.path.join("frontend", "dist", "index.html")) +async def serve_chat(request): + """Serve the chat.html file for specific chat routes""" + return FileResponse(os.path.join("frontend", "dist", "chat.html")) + routes = [ Route("/", serve_frontend, methods=["GET"]), + Route("/chats/{chat_id:str}", serve_chat, methods=["GET"]), Route("/api/models", get_models, methods=["GET"]), Route("/api/chats", create_chat, methods=["POST"]), Route("/api/chats/{chat_id:str}", history, methods=["GET"]),