We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2817776 commit 7c43499Copy full SHA for 7c43499
routers/chat.py
@@ -228,9 +228,11 @@ async def handle_assistant_stream(
228
if tool_call.code_interpreter and tool_call.code_interpreter.outputs:
229
for output in tool_call.code_interpreter.outputs:
230
if output.type == "logs" and output.logs:
231
+ # Replace "\n" in the logs with "\n> " to format it as console output
232
+ output_logs = "\n\n> " + str(output.logs).strip().replace("\n", "\n> ")
233
yield sse_format(
234
"toolDelta",
- wrap_for_oob_swap(step_id, str(output.logs))
235
+ wrap_for_oob_swap(step_id, output_logs)
236
)
237
elif output.type == "image" and output.image and output.image.file_id:
238
logger.debug(f"Image Output - File ID: {output.image.file_id}")
0 commit comments