Shakir60 commited on
Commit
7914a56
·
verified ·
1 Parent(s): 41295fd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
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
- # [Rest of the code remains the same...]
 
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"""