def log_response(response): if log_enabled: with st.chat_message("ai"): st.markdown("Agent Response\n {}".format(response)) print(response)