bstraehle commited on
Commit
53e2acb
1 Parent(s): c865dde

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -184,7 +184,10 @@ def generate_tool_outputs(tool_call_ids, tool_call_results):
184
  for tool_call_id, tool_call_result in zip(tool_call_ids, tool_call_results):
185
  tool_output = {
186
  "tool_call_id": tool_call_id,
187
- "output": tool_call_result.to_json()
 
 
 
188
  }
189
 
190
  tool_outputs.append(tool_output)
 
184
  for tool_call_id, tool_call_result in zip(tool_call_ids, tool_call_results):
185
  tool_output = {
186
  "tool_call_id": tool_call_id,
187
+ "output": try:
188
+ tool_call_result.to_json()
189
+ except AttributeError:
190
+ tool_call_result
191
  }
192
 
193
  tool_outputs.append(tool_output)