Ajey95 commited on
Commit
862d762
·
1 Parent(s): c2238f3

Fix: chat_history addition

Browse files
agents/academic_agent.py CHANGED
@@ -337,6 +337,7 @@ class AcademicAgent:
337
  CONVERSATION HISTORY:
338
  {history_for_prompt}
339
  {context_section}
 
340
  CURRENT QUESTION:
341
  User: {query}
342
 
 
337
  CONVERSATION HISTORY:
338
  {history_for_prompt}
339
  {context_section}
340
+
341
  CURRENT QUESTION:
342
  User: {query}
343
 
agents/router_agent.py CHANGED
@@ -321,16 +321,16 @@ class RouterAgent:
321
 
322
  # 2. Mnemonic Agent
323
  if any(cmd in query_lower for cmd in ["mnemonic", "memory aid", "remember"]):
324
- return self.mnemonic_agent.process_query(query, file_context)
325
 
326
  # 3. Quiz Agent
327
  if any(cmd in query_lower for cmd in ["quiz", "test me", "flashcard"]):
328
- return self.quiz_agent.process_query(query, file_context)
329
 
330
  # 4. Drug Info Agent
331
  # Uses keywords and also checks for common drug endings like 'ol', 'in', 'am'
332
  if any(cmd in query_lower for cmd in ["drug", "medicine", "medication", "side effect", "dosage", "interaction"]):
333
- return self.drug_info_agent.process_query(query, file_context)
334
  if re.search(r'\b(paracetamol|ibuprofen|metformin|aspirin|amoxicillin)\b', query_lower):
335
  return self.drug_info_agent.process_query(query, file_context)
336
 
 
321
 
322
  # 2. Mnemonic Agent
323
  if any(cmd in query_lower for cmd in ["mnemonic", "memory aid", "remember"]):
324
+ return self.mnemonic_agent.process_query(query, file_context,chat_history)
325
 
326
  # 3. Quiz Agent
327
  if any(cmd in query_lower for cmd in ["quiz", "test me", "flashcard"]):
328
+ return self.quiz_agent.process_query(query, file_context,chat_history)
329
 
330
  # 4. Drug Info Agent
331
  # Uses keywords and also checks for common drug endings like 'ol', 'in', 'am'
332
  if any(cmd in query_lower for cmd in ["drug", "medicine", "medication", "side effect", "dosage", "interaction"]):
333
+ return self.drug_info_agent.process_query(query, file_context,chat_history)
334
  if re.search(r'\b(paracetamol|ibuprofen|metformin|aspirin|amoxicillin)\b', query_lower):
335
  return self.drug_info_agent.process_query(query, file_context)
336