Spaces:
Running
Running
fix update_func
Browse files
app.py
CHANGED
@@ -90,8 +90,9 @@ def initialize_agent(_cfg):
|
|
90 |
"""
|
91 |
|
92 |
def update_func(status_type: AgentStatusType, msg: str):
|
93 |
-
|
94 |
-
|
|
|
95 |
|
96 |
agent = Agent(
|
97 |
tools=create_tools(_cfg),
|
@@ -209,7 +210,7 @@ def launch_bot():
|
|
209 |
if st.session_state.show_logs:
|
210 |
st.button("Hide Logs", on_click=toggle_logs)
|
211 |
for msg in st.session_state.log_messages:
|
212 |
-
st.
|
213 |
else:
|
214 |
if len(st.session_state.log_messages) > 0:
|
215 |
st.button("Show Logs", on_click=toggle_logs)
|
|
|
90 |
"""
|
91 |
|
92 |
def update_func(status_type: AgentStatusType, msg: str):
|
93 |
+
if status_type != AgentStatusType.AGENT_UPDATE:
|
94 |
+
output = f"{status_type.value} - {msg}"
|
95 |
+
st.session_state.log_messages.append(output)
|
96 |
|
97 |
agent = Agent(
|
98 |
tools=create_tools(_cfg),
|
|
|
210 |
if st.session_state.show_logs:
|
211 |
st.button("Hide Logs", on_click=toggle_logs)
|
212 |
for msg in st.session_state.log_messages:
|
213 |
+
st.text(msg)
|
214 |
else:
|
215 |
if len(st.session_state.log_messages) > 0:
|
216 |
st.button("Show Logs", on_click=toggle_logs)
|