File size: 437 Bytes
b862271
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
## 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