Spaces:
Running
Running
Update assistants.py
Browse files- assistants.py +4 -1
assistants.py
CHANGED
@@ -169,11 +169,14 @@ def execute_tool_calls(run_steps):
|
|
169 |
for tool_call in step_details.tool_calls:
|
170 |
print(get_json("tool_call", tool_call))
|
171 |
|
172 |
-
|
173 |
|
174 |
if hasattr(tool_call, "function"):
|
|
|
175 |
tool_call_ids.append(tool_call.id)
|
176 |
tool_call_results.append(execute_tool_call(tool_call))
|
|
|
|
|
177 |
|
178 |
return tool_call_ids, tool_call_results
|
179 |
|
|
|
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 |
|