Feedback not saving or showing any messgaes

I am using streamlit_feedback in my chat app , but i m not able to print any success messages, when a feedback is submitted , I also want to store the in a data base , can someone help me in that!

As soon as I am clicking the submit button , it is re running the app without any toast alert!

This is my code snippet

def handle_feedback():
            st.write(st.session_state.fb_k)
            st.toast("✔️ Feedback received!")

if prompt := st.chat_input(" Ask your document?"):
        st.chat_message("user").markdown(prompt)
        st.session_state.messages.append({"role": "user", "content": prompt})
        with st_lottie_spinner(loading_animation, quality='high', height='70px', width='70px'):
            ans,unique_links = get_response_from_django(prompt)
            with st.chat_message("assistant"):
                st.markdown(ans)

        streamlit_feedback(
                        feedback_type="thumbs",
                        optional_text_label="[Optional] Please provide an explanation",
                        align="flex-start",
                        key=f"fb_k",
                        on_submit=handle_feedback,
            )

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.