Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -60,11 +60,15 @@ def chat(message, history, openai_api_key):
|
|
60 |
messages = get_messages(get_thread())
|
61 |
text_values, image_values = extract_content_values(messages)
|
62 |
|
|
|
|
|
63 |
for text_value in list(reversed(text_values)):
|
64 |
-
|
|
|
65 |
|
66 |
for image_value in image_values:
|
67 |
-
|
|
|
68 |
except Exception as e:
|
69 |
raise gr.Error(e)
|
70 |
|
|
|
60 |
messages = get_messages(get_thread())
|
61 |
text_values, image_values = extract_content_values(messages)
|
62 |
|
63 |
+
i = 0
|
64 |
+
|
65 |
for text_value in list(reversed(text_values)):
|
66 |
+
i = i + 1
|
67 |
+
texts += f"**Message {i}:**{text_value}"
|
68 |
|
69 |
for image_value in image_values:
|
70 |
+
i = i + 1
|
71 |
+
images += f"**File {i}:**[https://platform.openai.com/storage/files/{image_value}](https://platform.openai.com/storage/files/{image_value})"
|
72 |
except Exception as e:
|
73 |
raise gr.Error(e)
|
74 |
|