playground

This commit is contained in:
Xi Yan 2024-11-27 15:31:57 -08:00
parent 68b70d1b1f
commit 73335e4aaf

View file

@ -60,10 +60,16 @@ with st.sidebar:
help="Initial instructions given to the AI to set its behavior and context",
)
# Add clear chat button to sidebar
if st.button("Clear Chat", use_container_width=True):
st.session_state.messages = []
st.rerun()
# Main chat interface
st.title("🦙 Chat")
# Initialize chat history
if "messages" not in st.session_state:
st.session_state.messages = []