Jeremy Live
commited on
Commit
·
47347d6
1
Parent(s):
80869fd
Revert "v2"
Browse filesThis reverts commit 6751efe9fab59a6b2854965bf263ab30a201ac30.
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 |
# 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
|
|
|
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
|