bstraehle commited on
Commit
c195fb8
1 Parent(s): a2e417d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -119,9 +119,10 @@ def get_run_step_details(run_steps):
119
  # [CodeInterpreterOutputImage(image=CodeInterpreterOutputImageImage(file_id='file-qmr1d6ObICSjyGvmoncXvBPj'), type='image')]
120
  if len(tool_call.code_interpreter.outputs) > 0:
121
  print("\n\n")
122
- print(tool_call.code_interpreter.outputs[0]["file_id"])
123
- print(tool_call.code_interpreter.outputs[0]["type"])
124
- print("\n\n")
 
125
 
126
  def get_messages(client, thread):
127
  messages = client.beta.threads.messages.list(
 
119
  # [CodeInterpreterOutputImage(image=CodeInterpreterOutputImageImage(file_id='file-qmr1d6ObICSjyGvmoncXvBPj'), type='image')]
120
  if len(tool_call.code_interpreter.outputs) > 0:
121
  print("\n\n")
122
+ if hasattr(tool_call.code_interpreter.outputs[0], "image"):
123
+ print(tool_call.code_interpreter.outputs[0].image.file_id)
124
+ print(tool_call.code_interpreter.outputs[0].image.type)
125
+ print("\n\n")
126
 
127
  def get_messages(client, thread):
128
  messages = client.beta.threads.messages.list(