Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -263,12 +263,12 @@ def chat(message, history):
|
|
263 |
print("###")
|
264 |
print(len(tool_call_ids))
|
265 |
print(tool_call_ids)
|
266 |
-
print(tool_call_ids[
|
267 |
print(tool_call_results)
|
268 |
-
print(tool_call_results[
|
269 |
print("###")
|
270 |
|
271 |
-
if tool_call_ids[
|
272 |
# https://platform.openai.com/docs/api-reference/runs/submitToolOutputs
|
273 |
run = client.beta.threads.runs.submit_tool_outputs(
|
274 |
thread_id=thread.id,
|
@@ -276,8 +276,8 @@ def chat(message, history):
|
|
276 |
#tool_outputs=generate_tool_outputs(tool_call_ids, tool_call_results)
|
277 |
tool_outputs=[
|
278 |
{
|
279 |
-
"tool_call_id": tool_call_ids[
|
280 |
-
"output": tool_call_results[
|
281 |
}
|
282 |
]
|
283 |
)
|
|
|
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 |
+
if tool_call_ids[1]:
|
272 |
# https://platform.openai.com/docs/api-reference/runs/submitToolOutputs
|
273 |
run = client.beta.threads.runs.submit_tool_outputs(
|
274 |
thread_id=thread.id,
|
|
|
276 |
#tool_outputs=generate_tool_outputs(tool_call_ids, tool_call_results)
|
277 |
tool_outputs=[
|
278 |
{
|
279 |
+
"tool_call_id": tool_call_ids[1],
|
280 |
+
"output": tool_call_results[1].to_json()
|
281 |
}
|
282 |
]
|
283 |
)
|