legolasyiu commited on
Commit
d451172
·
verified ·
1 Parent(s): 7d70466

Update src/streamlit_app.py

Browse files
Files changed (1) hide show
  1. 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": "What is langgraph?"}]},{"callbacks": [st_callback]})
127
- output = response.get("output", str(response))
128
- st.write(output)
 
 
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)