Spaces:
Sleeping
Sleeping
Jonathan Bejarano
commited on
Commit
·
98fac20
1
Parent(s):
b76be56
summarizing chat history
Browse files
app.py
CHANGED
|
@@ -176,7 +176,8 @@ def respond(
|
|
| 176 |
print(f"🔍 DEBUG - New session started, selected country: {selected_country}")
|
| 177 |
|
| 178 |
messages = [{"role": "system", "content": current_system}]
|
| 179 |
-
|
|
|
|
| 180 |
messages.append({"role": "user", "content": message})
|
| 181 |
|
| 182 |
# Debug: Calculate approximate input token count
|
|
|
|
| 176 |
print(f"🔍 DEBUG - New session started, selected country: {selected_country}")
|
| 177 |
|
| 178 |
messages = [{"role": "system", "content": current_system}]
|
| 179 |
+
if history:
|
| 180 |
+
messages.append({"role": "system", "content": "Guess # " + str(len(history) + 1)})
|
| 181 |
messages.append({"role": "user", "content": message})
|
| 182 |
|
| 183 |
# Debug: Calculate approximate input token count
|