SmartMate / app /routes /health.py
ngwakomadikwe's picture
Create app/routes/health.py
b6a28e0 verified
raw
history blame
824 Bytes
"""
Health check routes
"""
import os
from flask import Blueprint, jsonify, current_app
health_bp = Blueprint('health', __name__)
@health_bp.route("/health", methods=["GET"])
def health_check():
"""
Health check endpoint
"""
return jsonify({
"status": "healthy",
"service": "flask-openai-chat",
"version": "1.0.0"
}), 200
@health_bp.route("/", methods=["GET"])
def root():
"""
Root endpoint with API information
"""
return jsonify({
"message": "Flask OpenAI Chat API",
"version": "1.0.0",
"endpoints": {
"chat": "/chat (POST)",
"models": "/chat/models (GET)",
"health": "/health (GET)"
},
"documentation": "Send POST request to /chat with JSON: {'message': 'your message'}"
}), 200