Spaces:
Running
Running
Update app.py
Browse files
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":
|
|
|
|
|
|
|
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)
|