File size: 638 Bytes
51769a3
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# error_explainer.py — H-Script error → human explanation
# Implemented: via POST /ai/explain-error (ai/api/explain_error.py)
# Classifies error type, generates Hinglish explanation + fix suggestion via Groq.

def explain_error(error_type: str, message: str, code: str) -> dict:
    """
    Implemented — see ai/api/explain_error.py for the live FastAPI endpoint.
    Returns { explanation, suggestion, error_type } powered by Llama 3.1 via Groq.
    """
    return {
        "status": "implemented",
        "endpoint": "POST /ai/explain-error",
        "note": "Call the FastAPI endpoint for live AI-powered explanations.",
    }