anl139 commited on
Commit
1dbb807
·
verified ·
1 Parent(s): a1ce978

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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[0:]]
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