Update app.py
Browse files
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)
|