Psychological_Chatbot / session_state.py
sravyaa02's picture
Upload 10 files
b3391d7 verified
raw
history blame contribute delete
831 Bytes
# session_state.py
import streamlit as st
def initialize_session_state():
if "avatars" not in st.session_state:
st.session_state.avatars = {'user': None, 'assistant': None}
if 'user_text' not in st.session_state:
st.session_state.user_text = None
if "max_response_length" not in st.session_state:
st.session_state.max_response_length = 1000
if "system_message" not in st.session_state:
st.session_state.system_message = "friendly AI conversing with a human user"
if "starter_message" not in st.session_state:
st.session_state.starter_message = "Hello, there! How can I help you today?"
if "chat_history" not in st.session_state:
st.session_state.chat_history = [{"role": "assistant", "content": st.session_state.starter_message}]