Spaces:
Sleeping
Sleeping
Update src/streamlit_app.py
Browse files- src/streamlit_app.py +4 -3
src/streamlit_app.py
CHANGED
|
@@ -123,6 +123,7 @@ if prompt := st.chat_input("Ask your research question..."):
|
|
| 123 |
st.chat_message("user").write(prompt)
|
| 124 |
with st.chat_message("assistant"):
|
| 125 |
st_callback = StreamlitCallbackHandler(st.container())
|
| 126 |
-
response = agent.invoke({"messages": [{"role": "user", "content":
|
| 127 |
-
|
| 128 |
-
|
|
|
|
|
|
| 123 |
st.chat_message("user").write(prompt)
|
| 124 |
with st.chat_message("assistant"):
|
| 125 |
st_callback = StreamlitCallbackHandler(st.container())
|
| 126 |
+
response = agent.invoke({"messages": [{"role": "user", "content": prompt}]},{"callbacks": [st_callback]})
|
| 127 |
+
displayed_response = response["messages"][-1].content
|
| 128 |
+
#output = response.get("output", str(response))
|
| 129 |
+
st.write(displayed_response)
|