mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-02 21:19:12 +00:00
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:
@@ -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
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user