eaglelandsonce commited on
Commit
46e06df
·
verified ·
1 Parent(s): fac3999

Update pages/10_Gemini-ChatOnly.py

Browse files
Files changed (1) hide show
  1. pages/10_Gemini-ChatOnly.py +3 -0
pages/10_Gemini-ChatOnly.py CHANGED
@@ -45,6 +45,9 @@ def send_message():
45
  response = model.generate_content([{"role": "user", "parts": [{"text": chat_history_str}]}])
46
  response_text = response.text if hasattr(response, "text") else "No response text found."
47
 
 
 
 
48
  st.session_state.user_input = ''
49
 
50
  display_chat_history()
 
45
  response = model.generate_content([{"role": "user", "parts": [{"text": chat_history_str}]}])
46
  response_text = response.text if hasattr(response, "text") else "No response text found."
47
 
48
+ if response_text:
49
+ st.session_state['chat_history'].append({"role": "model", "parts":[{"text": response_text}]})
50
+
51
  st.session_state.user_input = ''
52
 
53
  display_chat_history()