jyothisankar/code-interpreter
0
Code Interpreter with AI Error Analysis
A FastAPI service that executes Python code and uses an LLM (via aipipe.org) to identify the line numbers where errors occur.
Endpoint
POST /code-interpreter
Request:
{ "code": "x = 10\ny = 0\nresult = x / y\nprint(result)" }Response:
{ "error": [3], "result": "Traceback (most recent call last): ..." }- On success:
{ "error": [], "result": "<stdout>" } - On error:
{ "error": [<line numbers>], "result": "<traceback>" }
Configuration
Set the AIPIPE_TOKEN environment variable (as a Secret in the Space settings) to your token from <https://aipipe.org/login>.
