Update app.py
Browse files
app.py
CHANGED
@@ -307,8 +307,9 @@ class RAGSystem:
|
|
307 |
# Combine relevant documents into context
|
308 |
context = "\n\n".join([self.knowledge_base[i]["text"] for i in I[0]])
|
309 |
return context
|
310 |
-
|
311 |
-
|
|
|
312 |
|
313 |
def get_groq_response(query: str, context: str) -> str:
|
314 |
"""Get response from Groq LLM"""
|
|
|
307 |
# Combine relevant documents into context
|
308 |
context = "\n\n".join([self.knowledge_base[i]["text"] for i in I[0]])
|
309 |
return context
|
310 |
+
except Exception as e:
|
311 |
+
logger.error(f"Error retrieving context: {e}")
|
312 |
+
return ""
|
313 |
|
314 |
def get_groq_response(query: str, context: str) -> str:
|
315 |
"""Get response from Groq LLM"""
|