coder001 / st_reset_conversation.py
allinaigc's picture
Upload 26 files
b862271 verified
raw
history blame
437 Bytes
## reset all conversion inside streamlit
## clear conversion.
import streamlit as st
def reset_all():
# st.session_state.conversation = None ## 关闭这个可以保持当前的模型选项?
st.session_state.chat_history = None
st.session_state.messages = []
message_placeholder = st.empty()
return None
def reset_message():
st.session_state.messages = []
message_placeholder = st.empty()
return None