Update app.py
Browse files
app.py
CHANGED
|
@@ -228,7 +228,7 @@ def message_and_history(message, history):
|
|
| 228 |
|
| 229 |
# Combine the most recent conversation turns, excluding the assistant's prefix.
|
| 230 |
conversation_context = "\n".join(
|
| 231 |
-
[f"{msg['role']}: {msg['content'].replace('<b>LA2050 Navigator:</b><br>', '')}" for msg in history[
|
| 232 |
)
|
| 233 |
retrieved_docs = retriever.invoke(conversation_context)
|
| 234 |
|
|
|
|
| 228 |
|
| 229 |
# Combine the most recent conversation turns, excluding the assistant's prefix.
|
| 230 |
conversation_context = "\n".join(
|
| 231 |
+
[f"{msg['role']}: {msg['content'].replace('<b>LA2050 Navigator:</b><br>', '')}" for msg in history[-1:]]
|
| 232 |
)
|
| 233 |
retrieved_docs = retriever.invoke(conversation_context)
|
| 234 |
|