Files
LLM-infa/api/route/default.py
2026-02-18 13:38:18 +05:00

18 lines
492 B
Python

from fastapi import APIRouter
import toml
from pathlib import Path
router = APIRouter()
@router.get("/")
async def root():
version = "dev"
pyproject_path = Path(__file__).parent.parent.parent / "pyproject.toml"
if pyproject_path.exists():
try:
data = toml.load(pyproject_path)
version = data.get("project", {}).get("version", "dev")
except Exception:
pass
return {"status": "ok", "msg": "VPN Bot API", "version": version}