bstraehle commited on
Commit
d39bcdd
1 Parent(s): 70b1d7d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -201,9 +201,9 @@ def chat(message, history):
201
  tool_call_id, tool_call_result = execute_tool_calls(run_steps)
202
 
203
  ### TODO
204
- if tool_call_result:
205
  print("### tool_call_id=" + tool_call_id)
206
- print("### tool_call_result=" + tool_call_result)
207
 
208
  # https://platform.openai.com/docs/api-reference/runs/submitToolOutputs
209
  run = client.beta.threads.runs.submit_tool_outputs(
@@ -221,9 +221,9 @@ def chat(message, history):
221
  run_steps = get_run_steps(client, thread, run)
222
  tool_call_id, tool_call_result = execute_tool_calls(run_steps)
223
  ###
224
- if tool_call_result:
225
  print("### tool_call_id=" + tool_call_id)
226
- print("### tool_call_result=" + tool_call_result)
227
 
228
  # https://platform.openai.com/docs/api-reference/runs/submitToolOutputs
229
  run = client.beta.threads.runs.submit_tool_outputs(
 
201
  tool_call_id, tool_call_result = execute_tool_calls(run_steps)
202
 
203
  ### TODO
204
+ if tool_call_id:
205
  print("### tool_call_id=" + tool_call_id)
206
+ print(tool_call_result)
207
 
208
  # https://platform.openai.com/docs/api-reference/runs/submitToolOutputs
209
  run = client.beta.threads.runs.submit_tool_outputs(
 
221
  run_steps = get_run_steps(client, thread, run)
222
  tool_call_id, tool_call_result = execute_tool_calls(run_steps)
223
  ###
224
+ if tool_call_id:
225
  print("### tool_call_id=" + tool_call_id)
226
+ print(tool_call_result)
227
 
228
  # https://platform.openai.com/docs/api-reference/runs/submitToolOutputs
229
  run = client.beta.threads.runs.submit_tool_outputs(