bstraehle commited on
Commit
e985785
1 Parent(s): edd6630

Update assistants.py

Browse files
Files changed (1) hide show
  1. assistants.py +4 -5
assistants.py CHANGED
@@ -163,20 +163,19 @@ def execute_tool_calls(run_steps):
163
  print(get_json("step_details", step_details))
164
 
165
  if step.usage:
166
- gr.Info(f"{step_details.type} {get_json('usage', step.usage)}", duration=30)
167
 
168
  if hasattr(step_details, "tool_calls"):
169
  for tool_call in step_details.tool_calls:
170
  print(get_json("tool_call", tool_call))
171
 
172
- fname = ""
 
173
 
174
  if hasattr(tool_call, "function"):
175
- fname = 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_call.type} {fname}", duration=30)
180
 
181
  return tool_call_ids, tool_call_results
182
 
 
163
  print(get_json("step_details", step_details))
164
 
165
  if step.usage:
166
+ gr.Info(f"Step: {step_details.type}, {get_json('usage', step.usage)}", duration=30)
167
 
168
  if hasattr(step_details, "tool_calls"):
169
  for tool_call in step_details.tool_calls:
170
  print(get_json("tool_call", tool_call))
171
 
172
+ #fname = ""
173
+ gr.Info(tool_call.type, duration=30)
174
 
175
  if hasattr(tool_call, "function"):
176
+ #fname = tool_call.function.name
177
  tool_call_ids.append(tool_call.id)
178
  tool_call_results.append(execute_tool_call(tool_call))
 
 
179
 
180
  return tool_call_ids, tool_call_results
181