moazzamdev commited on
Commit
734215d
·
verified ·
1 Parent(s): 1046c54

Update page1.py

Browse files
Files changed (1) hide show
  1. page1.py +8 -7
page1.py CHANGED
@@ -82,7 +82,12 @@ def text():
82
  memory_key="history",
83
  chat_memory=st.session_state.chat_history
84
  )
85
-
 
 
 
 
 
86
  # Initialize Gemini model
87
  llm = ChatGoogleGenerativeAI(
88
  model="gemini-2.5-flash",
@@ -94,14 +99,10 @@ def text():
94
 
95
  )
96
  # Add system prompt (psychological assistant)
97
- system_prompt = (
98
- "You are a compassionate and emotionally intelligent AI assistant trained in cognitive behavioral therapy (CBT), "
99
- "mindfulness, and active listening. You provide supportive, empathetic responses without making medical diagnoses. "
100
- "Use a warm tone and guide users to explore their feelings, reframe thoughts, and reflect gently."
101
- )
102
 
103
  # Add SystemMessage to chat history
104
- st.session_state.chat_history.add_message(SystemMessage(content=system_prompt))
105
  # Display chat messages
106
  chat_container = st.container()
107
  with chat_container:
 
82
  memory_key="history",
83
  chat_memory=st.session_state.chat_history
84
  )
85
+ system_prompt = (
86
+ "You are a compassionate and emotionally intelligent AI assistant trained in cognitive behavioral therapy (CBT), "
87
+ "mindfulness, and active listening. You provide supportive, empathetic responses without making medical diagnoses. "
88
+ "Use a warm tone and guide users to explore their feelings, reframe thoughts, and reflect gently."
89
+ )
90
+ st.session_state.chat_history.add_message(SystemMessage(content=system_prompt))
91
  # Initialize Gemini model
92
  llm = ChatGoogleGenerativeAI(
93
  model="gemini-2.5-flash",
 
99
 
100
  )
101
  # Add system prompt (psychological assistant)
102
+
 
 
 
 
103
 
104
  # Add SystemMessage to chat history
105
+ #st.session_state.chat_history.add_message(SystemMessage(content=system_prompt))
106
  # Display chat messages
107
  chat_container = st.container()
108
  with chat_container: