Spaces:
Sleeping
Sleeping
Download features/error_explainer.py from RoxieRoller/H-script-AI: direct link, hf CLI and curl.
- Browser
- Download file 638 Bytes
-
https://huggingface.co/spaces/RoxieRoller/H-script-AI/resolve/main/features/error_explainer.py
- Command line
-
hf download hf://spaces/RoxieRoller/H-script-AI/features/error_explainer.py
-
curl -L -o error_explainer.py https://huggingface.co/spaces/RoxieRoller/H-script-AI/resolve/main/features/error_explainer.py
638 Bytes
| # 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.", | |
| } | |