Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -105,19 +105,23 @@ def get_run_step_details(run_steps):
|
|
105 |
|
106 |
show_json("step_details", step_details)
|
107 |
|
|
|
108 |
if hasattr(step_details, "tool_calls"):
|
109 |
for tool_call in step_details.tool_calls:
|
110 |
print("\n\n")
|
111 |
show_json("tool_call", tool_call)
|
112 |
print("\n\n")
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
|
|
|
|
|
|
121 |
|
122 |
def get_messages(client, thread):
|
123 |
messages = client.beta.threads.messages.list(
|
|
|
105 |
|
106 |
show_json("step_details", step_details)
|
107 |
|
108 |
+
###
|
109 |
if hasattr(step_details, "tool_calls"):
|
110 |
for tool_call in step_details.tool_calls:
|
111 |
print("\n\n")
|
112 |
show_json("tool_call", tool_call)
|
113 |
print("\n\n")
|
114 |
+
if hasattr(tool_call, "code_interpreter"):
|
115 |
+
print(tool_call.code_interpreter)
|
116 |
+
print("\n\n")
|
117 |
+
if hasattr(tool_call.code_interpreter, "outputs"):
|
118 |
+
print(tool_call.code_interpreter.outputs)
|
119 |
+
# [CodeInterpreterOutputImage(image=CodeInterpreterOutputImageImage(file_id='file-qmr1d6ObICSjyGvmoncXvBPj'), type='image')]
|
120 |
+
if len(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(
|