Skip to content

Commit

Permalink
add feedback feature
Browse files Browse the repository at this point in the history
  • Loading branch information
NghiaDinh003 authored and NghiaDinh003 committed Jun 23, 2023
1 parent e27fac0 commit 346033a
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 42 deletions.
74 changes: 32 additions & 42 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions chat.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"<p style='text-align: center;'><a href='{Feedback_link}' target='_blank' style='color: red; text-decoration: none;'>"
f"{Feedback_text}</a></p>"
)
sidebar.markdown(styled_text, unsafe_allow_html=True)


def reinitialize_chat(model: str):
st.session_state["conversation"] = DEFAULT_CONVERSATION
Expand Down

0 comments on commit 346033a

Please sign in to comment.