WanIrfan commited on
Commit
e4c08c6
·
verified ·
1 Parent(s): 003d105

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -246,7 +246,7 @@ def medical_page():
246
 
247
  agent = rag_systems['medical']
248
  if not agent: raise Exception("Medical RAG system is not loaded.")
249
- response_dict = agent.answer(enhanced_query, chat_history=history)
250
  answer, thoughts, validation, source = parse_agent_response(response_dict)
251
  history_for_agent.append(HumanMessage(content=query))
252
  history_for_agent.append(AIMessage(content=answer))
@@ -265,7 +265,7 @@ def medical_page():
265
  history_doc_context = history_for_agent # Use hydrated list
266
  if current_medical_document:
267
  logger.info("Processing Follow-up Query for Document")
268
- history_doc_context = [HumanMessage(content=f"We are discussing this document:\n{current_medical_document}")] + history
269
  else:
270
  logger.info("Processing Text RAG query for Medical domain")
271
 
 
246
 
247
  agent = rag_systems['medical']
248
  if not agent: raise Exception("Medical RAG system is not loaded.")
249
+ response_dict = agent.answer(enhanced_query, chat_history=history_for_agent)
250
  answer, thoughts, validation, source = parse_agent_response(response_dict)
251
  history_for_agent.append(HumanMessage(content=query))
252
  history_for_agent.append(AIMessage(content=answer))
 
265
  history_doc_context = history_for_agent # Use hydrated list
266
  if current_medical_document:
267
  logger.info("Processing Follow-up Query for Document")
268
+ history_doc_context = [HumanMessage(content=f"We are discussing this document:\n{current_medical_document}")] + history_for_agent
269
  else:
270
  logger.info("Processing Text RAG query for Medical domain")
271