Fix to store e2b code execution text output file content as string

Previously was encoding E2B code execution text output content as b64.

This was breaking
- The AI model's ability to see the content of the file
- Downloading the output text file with appropriately encoded content

Issue created when adding E2B code sandbox in #1120
This commit is contained in:
Debanjum
2025-03-19 14:59:48 +05:30
parent a7e261a191
commit 9b6d626a09

View File

@@ -257,7 +257,7 @@ async def execute_e2b(code: str, input_files: list[dict]) -> dict[str, Any]:
continue
else:
# Text files - encode utf-8 string as base64
b64_data = base64.b64encode(content.encode("utf-8")).decode("utf-8")
b64_data = content
output_files.append({"filename": f.name, "b64_data": b64_data})
# Collect output files from execution results