melk2025 commited on
Commit
7da06a0
·
verified ·
1 Parent(s): e3348e8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -134,9 +134,9 @@ def retrieve_from_cag(user_query, chat_history):
134
  # ---------------------- History-Aware RAG ----------------------
135
  def retrieve_from_rag(user_query, chat_history):
136
  # Combine history with current query
137
- history_context = " ".join([f"User: {msg[0]} Bot: {msg[1]}" for msg in chat_history]) + " "
138
- full_query = history_context + user_query
139
-
140
  print("Searching in RAG with history context...")
141
 
142
  query_embedding = embedding_model.encode(full_query)
 
134
  # ---------------------- History-Aware RAG ----------------------
135
  def retrieve_from_rag(user_query, chat_history):
136
  # Combine history with current query
137
+ #history_context = " ".join([f"User: {msg[0]} Bot: {msg[1]}" for msg in chat_history]) + " "
138
+ #full_query = history_context + user_query
139
+ full_query= user_query
140
  print("Searching in RAG with history context...")
141
 
142
  query_embedding = embedding_model.encode(full_query)