Hello,
I want to log the question + response of chatGPT but I use the stream response setting. I don’t know how to get it.
prompt = st.chat_input("Enter your question here...")
col1, col2 = st.columns(spec=2, gap="medium")
with col1:
st.header("Q.A")
st.empty()
# display pdf, e.g. st.markdown(f'<iframe src="......." width=100% height="550"></iframe>', unsafe_allow_html=True)
messages = st.container(height=400)
if prompt:
messages.chat_message("user").write(prompt)
stream = model.run(prompt)
messages.chat_message("assistant").write_stream(stream)
Thank you