nl2sql-copilot / app /main.py
Melika Kheirieh
init: NL2SQL Copilot base with API and Dockerfile
570f7bd
raw
history blame
617 Bytes
from dotenv import load_dotenv
load_dotenv()
from fastapi import FastAPI
from app.routers import nl2sql
app = FastAPI(
title="NL2SQL Copilot Prototype",
version="0.1.0",
description="Natural Language -> SQL Copilot API"
)
app.include_router(nl2sql.router, prefix="/api/v1")
@app.get("/healthz")
def health_check():
return {"status": "ok"}
@app.get("/")
def root():
return {"status": "ok", "message": "NL2SQL Copilot API is running"}
@app.get("/health")
def health():
return {
"status": "ok",
"db": "connected",
"llm": "reachable",
"uptime_sec": 123.4
}