Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -378,6 +378,7 @@ def main():
|
|
| 378 |
st.session_state.db
|
| 379 |
)
|
| 380 |
|
|
|
|
| 381 |
# Initialize conversation state
|
| 382 |
# Initialize conversation state
|
| 383 |
if "conversation" not in st.session_state:
|
|
@@ -390,10 +391,10 @@ def main():
|
|
| 390 |
"execution_results": {},
|
| 391 |
"confidence_scores": {},
|
| 392 |
"status": "planning",
|
| 393 |
-
"current_agent":
|
| 394 |
}
|
| 395 |
-
|
| 396 |
-
|
| 397 |
if "agent_state" not in st.session_state:
|
| 398 |
st.session_state.agent_state = AgentState(
|
| 399 |
messages=[],
|
|
@@ -404,7 +405,7 @@ def main():
|
|
| 404 |
execution_results={},
|
| 405 |
confidence_scores={},
|
| 406 |
status="planning",
|
| 407 |
-
current_agent=
|
| 408 |
)
|
| 409 |
|
| 410 |
# Main content area
|
|
|
|
| 378 |
st.session_state.db
|
| 379 |
)
|
| 380 |
|
| 381 |
+
# Initialize conversation state
|
| 382 |
# Initialize conversation state
|
| 383 |
# Initialize conversation state
|
| 384 |
if "conversation" not in st.session_state:
|
|
|
|
| 391 |
"execution_results": {},
|
| 392 |
"confidence_scores": {},
|
| 393 |
"status": "planning",
|
| 394 |
+
"current_agent": "understanding_agent" # Always a string, not a list
|
| 395 |
}
|
| 396 |
+
|
| 397 |
+
# Initialize agent state for new runs
|
| 398 |
if "agent_state" not in st.session_state:
|
| 399 |
st.session_state.agent_state = AgentState(
|
| 400 |
messages=[],
|
|
|
|
| 405 |
execution_results={},
|
| 406 |
confidence_scores={},
|
| 407 |
status="planning",
|
| 408 |
+
current_agent="understanding_agent" # Always a string, not a list
|
| 409 |
)
|
| 410 |
|
| 411 |
# Main content area
|