Spaces:
Runtime error
Runtime error
File size: 824 Bytes
b6a28e0 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
"""
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 |