Spaces:
Running
Running
Update assistants.py
Browse files- assistants.py +4 -1
assistants.py
CHANGED
@@ -161,11 +161,14 @@ def execute_tool_calls(run_steps):
|
|
161 |
for step in run_steps.data:
|
162 |
step_details = step.step_details
|
163 |
print(get_json("step_details", step_details))
|
164 |
-
|
|
|
|
|
165 |
|
166 |
if hasattr(step_details, "tool_calls"):
|
167 |
for tool_call in step_details.tool_calls:
|
168 |
print(get_json("tool_call", tool_call))
|
|
|
169 |
gr.Info(get_json("tool_call", tool_call), duration=30)
|
170 |
|
171 |
if hasattr(tool_call, "function"):
|
|
|
161 |
for step in run_steps.data:
|
162 |
step_details = step.step_details
|
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 |
gr.Info(get_json("tool_call", tool_call), duration=30)
|
173 |
|
174 |
if hasattr(tool_call, "function"):
|