stream responses and all tests passing
This commit is contained in:
+4
-1
@@ -1,3 +1,6 @@
|
||||
import asyncio
|
||||
|
||||
|
||||
async def bash(command: str, sandbox=None) -> str:
|
||||
"""
|
||||
Execute a bash command in the sandbox.
|
||||
@@ -14,7 +17,7 @@ async def bash(command: str, sandbox=None) -> str:
|
||||
return "Error: Sandbox not available"
|
||||
|
||||
try:
|
||||
result = await sandbox.run(command)
|
||||
result = await asyncio.to_thread(sandbox.run, command)
|
||||
return result
|
||||
|
||||
except RuntimeError as e:
|
||||
|
||||
Reference in New Issue
Block a user