ciyidogan commited on
Commit
11a0f16
Β·
verified Β·
1 Parent(s): 9b44949

Update chat_handler.py

Browse files
Files changed (1) hide show
  1. chat_handler.py +9 -0
chat_handler.py CHANGED
@@ -91,6 +91,15 @@ async def spark_generate(s: Session, prompt: str, user_msg: str) -> str:
91
  # ───────────────────────── FASTAPI ───────────────────────── #
92
  router = APIRouter()
93
 
 
 
 
 
 
 
 
 
 
94
  @router.get("/")
95
  def health():
96
  return {"status": "ok", "sessions": len(session_store._sessions)}
 
91
  # ───────────────────────── FASTAPI ───────────────────────── #
92
  router = APIRouter()
93
 
94
+ @router.get("/health")
95
+ def health_check():
96
+ """Health check endpoint for monitoring"""
97
+ return {
98
+ "status": "ok",
99
+ "sessions": len(session_store._sessions),
100
+ "timestamp": datetime.now().isoformat()
101
+ }
102
+
103
  @router.get("/")
104
  def health():
105
  return {"status": "ok", "sessions": len(session_store._sessions)}