Spaces:
Runtime error
Runtime error
Reduce timeout for terminal command execution from 30 to 3 seconds
Browse files- src/tools.py +4 -2
src/tools.py
CHANGED
|
@@ -6,8 +6,10 @@ import subprocess
|
|
| 6 |
from typing import Final
|
| 7 |
|
| 8 |
|
| 9 |
-
def execute_terminal(command: str, *, timeout: int =
|
| 10 |
-
"""
|
|
|
|
|
|
|
| 11 |
|
| 12 |
The command is executed with network access enabled. Output from both
|
| 13 |
``stdout`` and ``stderr`` is captured and returned. Commands are killed if
|
|
|
|
| 6 |
from typing import Final
|
| 7 |
|
| 8 |
|
| 9 |
+
def execute_terminal(command: str, *, timeout: int = 3) -> str:
|
| 10 |
+
"""
|
| 11 |
+
Execute a shell command inside an isolated Linux VM.
|
| 12 |
+
Use this tool to run various commands.
|
| 13 |
|
| 14 |
The command is executed with network access enabled. Output from both
|
| 15 |
``stdout`` and ``stderr`` is captured and returned. Commands are killed if
|