Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -162,6 +162,10 @@ def wait_on_run(client, thread, run):
|
|
162 |
def execute_tool_call(tools, tool_call):
|
163 |
name = tool_call.function.name
|
164 |
args = json.loads(tool_call.function.arguments)
|
|
|
|
|
|
|
|
|
165 |
|
166 |
print(f"{name}, {args}")
|
167 |
|
@@ -180,18 +184,8 @@ def list_run_steps(client, thread, run):
|
|
180 |
|
181 |
if not hasattr(step_details, "tool_calls"):
|
182 |
break
|
183 |
-
|
184 |
-
print("xxxxx")
|
185 |
-
print(get_current_agent())
|
186 |
-
print("xxxxx")
|
187 |
-
print(get_current_agent().tools)
|
188 |
-
print("xxxxx")
|
189 |
|
190 |
tools = {tool.__name__: tool for tool in get_current_agent().tools}
|
191 |
-
|
192 |
-
#print(tools[0])
|
193 |
-
#print(tools[1])
|
194 |
-
#print(tools[2])
|
195 |
|
196 |
for tool_call in step_details.tool_calls:
|
197 |
result = execute_tool_call(tools, tool_call)
|
|
|
162 |
def execute_tool_call(tools, tool_call):
|
163 |
name = tool_call.function.name
|
164 |
args = json.loads(tool_call.function.arguments)
|
165 |
+
|
166 |
+
print("XXXXX")
|
167 |
+
print(tools)
|
168 |
+
print("XXXXX")
|
169 |
|
170 |
print(f"{name}, {args}")
|
171 |
|
|
|
184 |
|
185 |
if not hasattr(step_details, "tool_calls"):
|
186 |
break
|
|
|
|
|
|
|
|
|
|
|
|
|
187 |
|
188 |
tools = {tool.__name__: tool for tool in get_current_agent().tools}
|
|
|
|
|
|
|
|
|
189 |
|
190 |
for tool_call in step_details.tool_calls:
|
191 |
result = execute_tool_call(tools, tool_call)
|