Skip to content

Commit 2f45250

Browse files
NghiaDinh003NghiaDinh003
NghiaDinh003
authored and
NghiaDinh003
committed
Add feedback feature
1 parent eaddf03 commit 2f45250

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

chat.py

+11-9
Original file line numberDiff line numberDiff line change
@@ -76,15 +76,17 @@ def render_new_chat(sidebar):
7676
reinitialize_chat(model_type)
7777

7878
if model_type == "gpt-4":
79-
FEEDBACK_TEXT = "Share Your Feedback with Us!!!"
80-
FEEDBACK_LINKs = (
81-
"https://coda.io/form/PusherGPT-Quick-Like-Wish_dWWuBv7G80O"
82-
)
83-
styled_text = (
84-
f"<p style='text-align: center;'><a href='{FEEDBACK_LINKs}' target='_blank' style='color: red; text-decoration: none;'>"
85-
f"{FEEDBACK_TEXT}</a></p>"
86-
)
87-
sidebar.markdown(styled_text, unsafe_allow_html=True)
79+
render_feedback_link(sidebar)
80+
81+
82+
def render_feedback_link(sidebar):
83+
Feedback_text = "Share Your Feedback with Us!!!"
84+
Feedback_link = "https://coda.io/form/PusherGPT-Quick-Like-Wish_dWWuBv7G80O"
85+
styled_text = (
86+
f"<p style='text-align: center;'><a href='{Feedback_link}' target='_blank' style='color: red; text-decoration: none;'>"
87+
f"{Feedback_text}</a></p>"
88+
)
89+
sidebar.markdown(styled_text, unsafe_allow_html=True)
8890

8991

9092
def reinitialize_chat(model: str):

0 commit comments

Comments
 (0)