Spaces:
Running
Running
Update assistants.py
Browse files- assistants.py +3 -3
assistants.py
CHANGED
|
@@ -101,7 +101,6 @@ def create_message(thread, msg):
|
|
| 101 |
)
|
| 102 |
|
| 103 |
print(get_json("message", message))
|
| 104 |
-
gr.Info(msg, duration=30)
|
| 105 |
return message
|
| 106 |
|
| 107 |
def create_run(assistant, thread):
|
|
@@ -163,6 +162,7 @@ def execute_tool_calls(run_steps):
|
|
| 163 |
step_details = step.step_details
|
| 164 |
str = get_json("step_details", step_details)
|
| 165 |
print(str)
|
|
|
|
| 166 |
gr.Info(str, duration=30)
|
| 167 |
|
| 168 |
if hasattr(step_details, "tool_calls"):
|
|
@@ -223,10 +223,10 @@ def extract_content_values(data):
|
|
| 223 |
if content.type == "text":
|
| 224 |
text_value = content.text.value
|
| 225 |
text_values.append(text_value)
|
| 226 |
-
gr.Info(text_value, duration=15)
|
| 227 |
if content.type == "image_file":
|
| 228 |
image_value = content.image_file.file_id
|
| 229 |
image_values.append(image_value)
|
| 230 |
-
gr.Info(image_value, duration=15)
|
| 231 |
|
| 232 |
return text_values, image_values
|
|
|
|
| 101 |
)
|
| 102 |
|
| 103 |
print(get_json("message", message))
|
|
|
|
| 104 |
return message
|
| 105 |
|
| 106 |
def create_run(assistant, thread):
|
|
|
|
| 162 |
step_details = step.step_details
|
| 163 |
str = get_json("step_details", step_details)
|
| 164 |
print(str)
|
| 165 |
+
gr.Info(step, duration=30)
|
| 166 |
gr.Info(str, duration=30)
|
| 167 |
|
| 168 |
if hasattr(step_details, "tool_calls"):
|
|
|
|
| 223 |
if content.type == "text":
|
| 224 |
text_value = content.text.value
|
| 225 |
text_values.append(text_value)
|
| 226 |
+
#gr.Info(text_value, duration=15)
|
| 227 |
if content.type == "image_file":
|
| 228 |
image_value = content.image_file.file_id
|
| 229 |
image_values.append(image_value)
|
| 230 |
+
#gr.Info(image_value, duration=15)
|
| 231 |
|
| 232 |
return text_values, image_values
|