Spaces:
Sleeping
Sleeping
Update tools/python_repl.py
Browse files- tools/python_repl.py +0 -2
tools/python_repl.py
CHANGED
|
@@ -1,9 +1,7 @@
|
|
| 1 |
import io
|
| 2 |
import contextlib
|
| 3 |
import threading
|
| 4 |
-
from langchain_core.tools import tool
|
| 5 |
|
| 6 |
-
@tool
|
| 7 |
def python_repl(code: str, timeout: int = 10) -> str:
|
| 8 |
"""Execute Python code and return its printed output. Use for calculations, string manipulation, parsing tables, etc.
|
| 9 |
You MUST use `print()` to output results. Available libraries: pandas (as pd), numpy (as np)."""
|
|
|
|
| 1 |
import io
|
| 2 |
import contextlib
|
| 3 |
import threading
|
|
|
|
| 4 |
|
|
|
|
| 5 |
def python_repl(code: str, timeout: int = 10) -> str:
|
| 6 |
"""Execute Python code and return its printed output. Use for calculations, string manipulation, parsing tables, etc.
|
| 7 |
You MUST use `print()` to output results. Available libraries: pandas (as pd), numpy (as np)."""
|