Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -164,10 +164,6 @@ def execute_tool_call(tools, tool_call):
|
|
164 |
args = json.loads(tool_call.function.arguments)
|
165 |
|
166 |
print(f"{name}, {args}")
|
167 |
-
|
168 |
-
print("XXXXX")
|
169 |
-
print(tools[name])
|
170 |
-
print("XXXXX")
|
171 |
|
172 |
#return tools[name](**args)
|
173 |
|
@@ -184,8 +180,14 @@ def list_run_steps(client, thread, run):
|
|
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)
|
@@ -250,7 +252,7 @@ def chat(message, history, openai_api_key):
|
|
250 |
global client
|
251 |
|
252 |
assistant = get_current_agent()
|
253 |
-
show_json("Current Agent", assistant)
|
254 |
|
255 |
thread = get_current_thread()
|
256 |
#show_json("Current Thread", thread)
|
|
|
164 |
args = json.loads(tool_call.function.arguments)
|
165 |
|
166 |
print(f"{name}, {args}")
|
|
|
|
|
|
|
|
|
167 |
|
168 |
#return tools[name](**args)
|
169 |
|
|
|
180 |
|
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")
|
189 |
+
print(tools)
|
190 |
+
print("XXXXX")
|
191 |
|
192 |
for tool_call in step_details.tool_calls:
|
193 |
result = execute_tool_call(tools, tool_call)
|
|
|
252 |
global client
|
253 |
|
254 |
assistant = get_current_agent()
|
255 |
+
#show_json("Current Agent", assistant)
|
256 |
|
257 |
thread = get_current_thread()
|
258 |
#show_json("Current Thread", thread)
|