bstraehle commited on
Commit
86a168e
1 Parent(s): 97f068a

Update assistants.py

Browse files
Files changed (1) hide show
  1. assistants.py +8 -8
assistants.py CHANGED
@@ -169,17 +169,17 @@ def execute_tool_calls(run_steps):
169
 
170
  if hasattr(step_details, "tool_calls"):
171
  for tool_call in step_details.tool_calls:
172
- if tool_call.output != None:
173
- print(get_json("tool_call", tool_call))
174
-
175
- func_name = ""
176
-
177
- if hasattr(tool_call, "function"):
178
  func_name = tool_call.function.name
179
  tool_call_ids.append(tool_call.id)
180
  tool_call_results.append(execute_tool_call(tool_call))
181
- else:
182
- gr.Info(f"Tool: {tool_call.type}", duration=30)
183
 
184
  return tool_call_ids, tool_call_results
185
 
 
169
 
170
  if hasattr(step_details, "tool_calls"):
171
  for tool_call in step_details.tool_calls:
172
+ print(get_json("tool_call", tool_call))
173
+
174
+ func_name = ""
175
+
176
+ if hasattr(tool_call, "function"):
177
+ if tool_call.output == None:
178
  func_name = tool_call.function.name
179
  tool_call_ids.append(tool_call.id)
180
  tool_call_results.append(execute_tool_call(tool_call))
181
+ else:
182
+ gr.Info(f"Tool: {tool_call.type}", duration=30)
183
 
184
  return tool_call_ids, tool_call_results
185