jdesiree commited on
Commit
566d0c8
·
verified ·
1 Parent(s): 6740bd5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -356,7 +356,7 @@ class Educational_Agent:
356
  logger.error(f"Error in tool processing: {e}")
357
  return f"I apologize, but I encountered an error while processing your request: {str(e)}"
358
 
359
- def process_without_tools(self, query: str) -> str:
360
  """Process query without tools"""
361
  try:
362
  # Include recent conversation in prompt
@@ -529,7 +529,7 @@ def clear_chat():
529
  """Clear the chat history."""
530
  global agent
531
  if agent is not None:
532
- agent.memory.clear()
533
  return [], ""
534
 
535
  def warmup_agent():
@@ -542,8 +542,8 @@ def warmup_agent():
542
  test_response = current_agent.chat("Hello, this is a warmup test.")
543
  logger.info(f"Agent warmup completed successfully! Test response length: {len(test_response)} chars")
544
 
545
- # Clear any test data from memory
546
- current_agent.memory.clear()
547
 
548
  except Exception as e:
549
  logger.error(f"Agent warmup failed: {e}")
 
356
  logger.error(f"Error in tool processing: {e}")
357
  return f"I apologize, but I encountered an error while processing your request: {str(e)}"
358
 
359
+ def process_without_tools(self, query: str) -> str:
360
  """Process query without tools"""
361
  try:
362
  # Include recent conversation in prompt
 
529
  """Clear the chat history."""
530
  global agent
531
  if agent is not None:
532
+ agent.conversation_history.clear()
533
  return [], ""
534
 
535
  def warmup_agent():
 
542
  test_response = current_agent.chat("Hello, this is a warmup test.")
543
  logger.info(f"Agent warmup completed successfully! Test response length: {len(test_response)} chars")
544
 
545
+ # Clear any test data from conversation history
546
+ current_agent.conversation_history.clear()
547
 
548
  except Exception as e:
549
  logger.error(f"Agent warmup failed: {e}")