bstraehle commited on
Commit
8529465
1 Parent(s): 2f7fa79

Update assistants.py

Browse files
Files changed (1) hide show
  1. assistants.py +4 -1
assistants.py CHANGED
@@ -165,7 +165,10 @@ def execute_tool_calls(run_steps):
165
  step_details = step.step_details
166
  print(get_json("step_details", step_details))
167
 
168
- gr.Info(f"Step: {step_details.type}, {get_json('usage', step.usage)}", duration=30)
 
 
 
169
 
170
  if hasattr(step_details, "tool_calls"):
171
  for tool_call in step_details.tool_calls:
 
165
  step_details = step.step_details
166
  print(get_json("step_details", step_details))
167
 
168
+ if step.usage:
169
+ gr.Info(f"Step: {step_details.type}, {get_json('usage', step.usage)}", duration=30)
170
+ else:
171
+ gr.Info(f"Step: {step_details.type}", duration=30)
172
 
173
  if hasattr(step_details, "tool_calls"):
174
  for tool_call in step_details.tool_calls: