Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -19,9 +19,9 @@ def format_chat_history(messages: list) -> list:
|
|
| 19 |
"""
|
| 20 |
Formats the chat history into a structure Gemini can understand
|
| 21 |
"""
|
| 22 |
-
print(f"t1 {message.get("role")}")
|
| 23 |
formatted_history = []
|
| 24 |
for message in messages:
|
|
|
|
| 25 |
# Skip thinking messages (messages with metadata)
|
| 26 |
if not (message.get("role") == "assistant" and "metadata" in message):
|
| 27 |
print(f"t2 {message}")
|
|
|
|
| 19 |
"""
|
| 20 |
Formats the chat history into a structure Gemini can understand
|
| 21 |
"""
|
|
|
|
| 22 |
formatted_history = []
|
| 23 |
for message in messages:
|
| 24 |
+
print(f"t1 {message.get("role")}")
|
| 25 |
# Skip thinking messages (messages with metadata)
|
| 26 |
if not (message.get("role") == "assistant" and "metadata" in message):
|
| 27 |
print(f"t2 {message}")
|