Handle breaking change in write file to e2b code sandbox

For some reason the function signature, kwargs are broken. Removing
usage of keyword args resolves the file upload to sandbox error.
This commit is contained in:
Debanjum
2025-06-19 16:35:14 -07:00
parent b18b7b2e33
commit 029bd3be56
2 changed files with 2 additions and 3 deletions

View File

@@ -34,7 +34,7 @@ class CodeContextFile(PydanticBaseModel):
class CodeContextResult(PydanticBaseModel):
success: bool
output_files: List[CodeContextFile]
std_out: str
std_out: Optional[str] = None
std_err: str
code_runtime: Optional[int] = None

View File

@@ -232,8 +232,7 @@ async def execute_e2b(code: str, input_files: list[dict]) -> dict[str, Any]:
try:
# Upload input files in parallel
upload_tasks = [
sandbox.files.write(path=file["filename"], data=base64.b64decode(file["b64_data"]), request_timeout=30)
for file in input_files
sandbox.files.write(file["filename"], base64.b64decode(file["b64_data"])) for file in input_files
]
await asyncio.gather(*upload_tasks)