Spaces:
Sleeping
Sleeping
NeonClary
Cursor
Serve the React SPA at / instead of the backend JSON banner (move health banner to /api/health)
b200cd6 Download multi_llm_chatbot_backend/app/api/routes/root.py from BrainForge/MuscleGrowthAI: direct link, hf CLI and curl.
- Browser
- Download file 905 Bytes
-
https://huggingface.co/spaces/BrainForge/MuscleGrowthAI/resolve/main/multi_llm_chatbot_backend/app/api/routes/root.py
- Command line
-
hf download hf://spaces/BrainForge/MuscleGrowthAI/multi_llm_chatbot_backend/app/api/routes/root.py
-
curl -L -o root.py https://huggingface.co/spaces/BrainForge/MuscleGrowthAI/resolve/main/multi_llm_chatbot_backend/app/api/routes/root.py
905 Bytes
| from fastapi import APIRouter | |
| from app.config import get_settings | |
| from app.version import __version__ | |
| import logging | |
| logger = logging.getLogger(__name__) | |
| router = APIRouter() | |
| # NB: keep this OFF the bare "/" path. In the single-container / Hugging Face | |
| # Spaces deployment the React SPA is mounted at "/" as a catch-all, and any | |
| # API route registered at exactly "/" would shadow the SPA's index.html and | |
| # leave users staring at this JSON banner instead of the app. | |
| def root(): | |
| title = get_settings().app.title | |
| return { | |
| "message": f"{title} Backend is up and running", | |
| "version": __version__, | |
| "features": [ | |
| "Configurable Personas", | |
| "Improved Session Management", | |
| "Unified Context Handling", | |
| "Ollama Support", | |
| "Gemini API Support", | |
| "Provider Switching" | |
| ] | |
| } | |