Bard [test mode]: add err handler
This commit is contained in:
parent
a0e705556d
commit
48ef8cd7a0
@ -65,9 +65,12 @@ def chat_gpt_conversation() -> None:
|
|||||||
|
|
||||||
|
|
||||||
def bard_conversation() -> None:
|
def bard_conversation() -> None:
|
||||||
|
try:
|
||||||
bard = Chatbot(st.secrets.api_credentials.bard_session)
|
bard = Chatbot(st.secrets.api_credentials.bard_session)
|
||||||
ai_content = bard.ask(st.session_state.user_text)
|
ai_content = bard.ask(st.session_state.user_text)
|
||||||
st.warning(ai_content)
|
st.warning(ai_content)
|
||||||
|
except AttributeError as err:
|
||||||
|
st.error(err)
|
||||||
|
|
||||||
|
|
||||||
def show_conversation() -> None:
|
def show_conversation() -> None:
|
||||||
|
Loading…
Reference in New Issue
Block a user