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"]),