bstraehle commited on
Commit
c865dde
1 Parent(s): e7c3210

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -11
app.py CHANGED
@@ -179,23 +179,16 @@ def extract_content_values(data):
179
 
180
  ###
181
  def generate_tool_outputs(tool_call_ids, tool_call_results):
182
- """
183
- Generate tool outputs from tool call IDs and results.
184
-
185
- Args:
186
- tool_call_ids (list): List of tool call IDs.
187
- tool_call_results (list): List of tool call results.
188
-
189
- Returns:
190
- list: List of tool outputs.
191
- """
192
  tool_outputs = []
 
193
  for tool_call_id, tool_call_result in zip(tool_call_ids, tool_call_results):
194
  tool_output = {
195
  "tool_call_id": tool_call_id,
196
- "output": tool_call_result
197
  }
 
198
  tool_outputs.append(tool_output)
 
199
  return tool_outputs
200
  ###
201
 
 
179
 
180
  ###
181
  def generate_tool_outputs(tool_call_ids, tool_call_results):
 
 
 
 
 
 
 
 
 
 
182
  tool_outputs = []
183
+
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)
191
+
192
  return tool_outputs
193
  ###
194