Jeremy Live commited on
Commit
6751efe
·
1 Parent(s): 89a7ec7
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -542,12 +542,12 @@ async def stream_agent_response(question: str, chat_history: List[List[str]]) ->
542
  except Exception as e:
543
  logger.error(f"Error updating agent memory: {str(e)}", exc_info=True)
544
 
545
- # Add empty assistant message that will be updated
546
- assistant_message = {"role": "assistant", "content": ""}
547
- messages.append(assistant_message)
548
-
549
  # Execute the agent with proper error handling
550
  try:
 
 
 
 
551
  # If the user is asking for a chart, steer the agent to be concise
552
  wants_chart, _desired = detect_chart_preferences(question)
553
  input_text = question
 
542
  except Exception as e:
543
  logger.error(f"Error updating agent memory: {str(e)}", exc_info=True)
544
 
 
 
 
 
545
  # Execute the agent with proper error handling
546
  try:
547
+ # Add empty assistant message that will be updated
548
+ assistant_message = {"role": "assistant", "content": ""}
549
+ messages.append(assistant_message)
550
+
551
  # If the user is asking for a chart, steer the agent to be concise
552
  wants_chart, _desired = detect_chart_preferences(question)
553
  input_text = question