Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -231,16 +231,16 @@ def chat(message, history):
|
|
231 |
|
232 |
### TODO
|
233 |
tool_call_ids, tool_call_results = execute_tool_calls(run_steps)
|
234 |
-
|
235 |
-
print("###")
|
236 |
-
print(len(tool_call_ids))
|
237 |
-
print(tool_call_ids)
|
238 |
-
print(tool_call_ids[0])
|
239 |
-
print(tool_call_results)
|
240 |
-
print(tool_call_results[0])
|
241 |
-
print("###")
|
242 |
|
243 |
if len(tool_call_ids) > 0:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
244 |
# https://platform.openai.com/docs/api-reference/runs/submitToolOutputs
|
245 |
run = client.beta.threads.runs.submit_tool_outputs(
|
246 |
thread_id=thread.id,
|
@@ -258,16 +258,16 @@ def chat(message, history):
|
|
258 |
run_steps = get_run_steps(client, thread, run)
|
259 |
###
|
260 |
tool_call_ids, tool_call_results = execute_tool_calls(run_steps)
|
261 |
-
|
262 |
-
print("###")
|
263 |
-
print(len(tool_call_ids))
|
264 |
-
print(tool_call_ids)
|
265 |
-
print(tool_call_ids[1])
|
266 |
-
print(tool_call_results)
|
267 |
-
print(tool_call_results[1])
|
268 |
-
print("###")
|
269 |
-
|
270 |
if len(tool_call_ids) > 1:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
271 |
# https://platform.openai.com/docs/api-reference/runs/submitToolOutputs
|
272 |
run = client.beta.threads.runs.submit_tool_outputs(
|
273 |
thread_id=thread.id,
|
|
|
231 |
|
232 |
### TODO
|
233 |
tool_call_ids, tool_call_results = execute_tool_calls(run_steps)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
234 |
|
235 |
if len(tool_call_ids) > 0:
|
236 |
+
print("###")
|
237 |
+
print(len(tool_call_ids))
|
238 |
+
print(tool_call_ids)
|
239 |
+
print(tool_call_ids[0])
|
240 |
+
print(tool_call_results)
|
241 |
+
print(tool_call_results[0])
|
242 |
+
print("###")
|
243 |
+
|
244 |
# https://platform.openai.com/docs/api-reference/runs/submitToolOutputs
|
245 |
run = client.beta.threads.runs.submit_tool_outputs(
|
246 |
thread_id=thread.id,
|
|
|
258 |
run_steps = get_run_steps(client, thread, run)
|
259 |
###
|
260 |
tool_call_ids, tool_call_results = execute_tool_calls(run_steps)
|
261 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
262 |
if len(tool_call_ids) > 1:
|
263 |
+
print("###")
|
264 |
+
print(len(tool_call_ids))
|
265 |
+
print(tool_call_ids)
|
266 |
+
print(tool_call_ids[1])
|
267 |
+
print(tool_call_results)
|
268 |
+
print(tool_call_results[1])
|
269 |
+
print("###")
|
270 |
+
|
271 |
# https://platform.openai.com/docs/api-reference/runs/submitToolOutputs
|
272 |
run = client.beta.threads.runs.submit_tool_outputs(
|
273 |
thread_id=thread.id,
|