From 4ba0c14ef561870ac8aea39793963e464b9a39cc Mon Sep 17 00:00:00 2001 From: NghiaDinh003 <92510310055@Ãispace.edu.vn> Date: Tue, 20 Jun 2023 21:14:50 +0700 Subject: [PATCH] add feedback feature --- Pipfile.lock | 2 +- chat.py | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/Pipfile.lock b/Pipfile.lock index b543301..85028b5 100644 --- a/Pipfile.lock +++ b/Pipfile.lock @@ -2044,4 +2044,4 @@ "version": "==20.23.1" } } -} +} \ No newline at end of file diff --git a/chat.py b/chat.py index b085a08..3c2fa53 100644 --- a/chat.py +++ b/chat.py @@ -75,6 +75,19 @@ def render_new_chat(sidebar): ): reinitialize_chat(model_type) + if model_type == "gpt-4": + render_feedback_link(sidebar) + + +def render_feedback_link(sidebar): + feedback_text = "Share Your Feedback with Us!!!" + feedback_link = "https://coda.io/form/PusherGPT-Quick-Like-Wish_dWWuBv7G80O" + styled_text = ( + f"
" + ) + sidebar.markdown(styled_text, unsafe_allow_html=True) + def reinitialize_chat(model: str): st.session_state["conversation"] = DEFAULT_CONVERSATION