Spaces:
Runtime error
Runtime error
Shroominic
commited on
Commit
·
b8c82e5
1
Parent(s):
a54f850
fix file output
Browse files
codeinterpreterapi/session.py
CHANGED
|
@@ -105,7 +105,7 @@ class CodeInterpreterSession():
|
|
| 105 |
filename = f"image-{uuid.uuid4()}.png"
|
| 106 |
file_buffer = BytesIO(base64.b64decode(output.content))
|
| 107 |
file_buffer.name = filename
|
| 108 |
-
|
| 109 |
return f"Image {filename} got send to the user."
|
| 110 |
|
| 111 |
elif output.type == "error":
|
|
|
|
| 105 |
filename = f"image-{uuid.uuid4()}.png"
|
| 106 |
file_buffer = BytesIO(base64.b64decode(output.content))
|
| 107 |
file_buffer.name = filename
|
| 108 |
+
self.output_files.append(File(name=filename, content=file_buffer.read()))
|
| 109 |
return f"Image {filename} got send to the user."
|
| 110 |
|
| 111 |
elif output.type == "error":
|