Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -159,7 +159,7 @@ def wait_on_run(client, thread, run):
|
|
159 |
|
160 |
return run
|
161 |
|
162 |
-
def execute_tool_call(
|
163 |
name = tool_call.function.name
|
164 |
args = json.loads(tool_call.function.arguments)
|
165 |
|
@@ -181,8 +181,6 @@ def list_run_steps(client, thread, run):
|
|
181 |
if not hasattr(step_details, "tool_calls"):
|
182 |
break
|
183 |
|
184 |
-
#tools = {tool.__name__: tool for tool in get_current_agent().tools}
|
185 |
-
|
186 |
print("XXXXX")
|
187 |
print(get_current_agent().tools)
|
188 |
print("XXXXX")
|
@@ -195,9 +193,11 @@ def list_run_steps(client, thread, run):
|
|
195 |
print(tool)
|
196 |
print("===")
|
197 |
###
|
198 |
-
|
|
|
|
|
199 |
for tool_call in step_details.tool_calls:
|
200 |
-
result = execute_tool_call(
|
201 |
|
202 |
return run_steps
|
203 |
|
|
|
159 |
|
160 |
return run
|
161 |
|
162 |
+
def execute_tool_call(tool_call):
|
163 |
name = tool_call.function.name
|
164 |
args = json.loads(tool_call.function.arguments)
|
165 |
|
|
|
181 |
if not hasattr(step_details, "tool_calls"):
|
182 |
break
|
183 |
|
|
|
|
|
184 |
print("XXXXX")
|
185 |
print(get_current_agent().tools)
|
186 |
print("XXXXX")
|
|
|
193 |
print(tool)
|
194 |
print("===")
|
195 |
###
|
196 |
+
|
197 |
+
#tools = {tool.__name__: tool for tool in get_current_agent().tools}
|
198 |
+
|
199 |
for tool_call in step_details.tool_calls:
|
200 |
+
result = execute_tool_call(tool_call)
|
201 |
|
202 |
return run_steps
|
203 |
|