execute Python expressions with Python Interpreter, can be used as a simple calculator e.g., "(123 + 234) / 23 * 19"
(code: str)
| 40 | |
| 41 | @tool.get("/execute_code") |
| 42 | def execute_python_code(code: str): |
| 43 | '''execute Python expressions with Python Interpreter, can be used as a simple calculator e.g., "(123 + 234) / 23 * 19" |
| 44 | ''' |
| 45 | return interpreter.execute_code(code) |
| 46 | |
| 47 | return tool |
nothing calls this directly
no test coverage detected