Bard [test mode]: add err handler

This commit is contained in:
if 2023-03-29 21:41:43 +03:00
parent a0e705556d
commit 48ef8cd7a0

View File

@ -65,9 +65,12 @@ def chat_gpt_conversation() -> None:
def bard_conversation() -> None:
try:
bard = Chatbot(st.secrets.api_credentials.bard_session)
ai_content = bard.ask(st.session_state.user_text)
st.warning(ai_content)
except AttributeError as err:
st.error(err)
def show_conversation() -> None: