bstraehle commited on
Commit
b3a9e72
1 Parent(s): 4dddc52

Update assistants.py

Browse files
Files changed (1) hide show
  1. assistants.py +4 -2
assistants.py CHANGED
@@ -152,6 +152,8 @@ def execute_tool_call(tool_call):
152
  except json.JSONDecodeError as e:
153
  print(f"Error parsing function name '{name}' function args '{args_json}': {e}")
154
 
 
 
155
  return tools[name](**args)
156
 
157
  def execute_tool_calls(run_steps):
@@ -175,8 +177,8 @@ def execute_tool_calls(run_steps):
175
  func_name = tool_call.function.name
176
  tool_call_ids.append(tool_call.id)
177
  tool_call_results.append(execute_tool_call(tool_call))
178
-
179
- gr.Info(f"Tool: {tool_call.type} {func_name}", duration=30)
180
 
181
  return tool_call_ids, tool_call_results
182
 
 
152
  except json.JSONDecodeError as e:
153
  print(f"Error parsing function name '{name}' function args '{args_json}': {e}")
154
 
155
+ gr.Info(f"Function: {name}, args: {args}", duration=30)
156
+
157
  return tools[name](**args)
158
 
159
  def execute_tool_calls(run_steps):
 
177
  func_name = tool_call.function.name
178
  tool_call_ids.append(tool_call.id)
179
  tool_call_results.append(execute_tool_call(tool_call))
180
+ else:
181
+ gr.Info(f"Tool: {tool_call.type}", duration=30)
182
 
183
  return tool_call_ids, tool_call_results
184