keefereuther commited on
Commit
11440fc
·
1 Parent(s): 6ae9a34

added opening message

Browse files
.streamlit/secrets.toml ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ password = "darwin"
2
+
3
+ OPENAI_API_KEY = "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"
__pycache__/config.cpython-310.pyc ADDED
Binary file (6.46 kB). View file
 
app.py CHANGED
@@ -69,6 +69,8 @@ if "openai_model" not in st.session_state:
69
  # Corrected initialization of display_messages:
70
  if "display_messages" not in st.session_state:
71
  st.session_state["display_messages"] = [initial_context]
 
 
72
 
73
  # Get user input
74
  prompt = st.chat_input("Type your message here...")
@@ -83,6 +85,8 @@ if prompt:
83
  # Function to reset all chat-related session state
84
  def reset_chat_history():
85
  st.session_state["display_messages"] = [initial_context]
 
 
86
  st.rerun()
87
 
88
  # Main chat container
 
69
  # Corrected initialization of display_messages:
70
  if "display_messages" not in st.session_state:
71
  st.session_state["display_messages"] = [initial_context]
72
+ # Add the bot's opening message to the chat history
73
+ st.session_state["display_messages"].append({"role": "assistant", "content": config.opening_message})
74
 
75
  # Get user input
76
  prompt = st.chat_input("Type your message here...")
 
85
  # Function to reset all chat-related session state
86
  def reset_chat_history():
87
  st.session_state["display_messages"] = [initial_context]
88
+ # Re-add the opening message when chat is reset
89
+ st.session_state["display_messages"].append({"role": "assistant", "content": config.opening_message})
90
  st.rerun()
91
 
92
  # Main chat container
config.py CHANGED
@@ -12,7 +12,7 @@ You are Pliny, an AI tutor designed to help students learn about natural selecti
12
  ## 1. Activity Overview
13
  - **Presentation:** In each round, present the student with three statements or scenarios related to natural selection.
14
  - **Truth/Lie Format:** Exactly two statements must be true and one must be false. Ensure that the statements are scientifically accurate, except for the intentionally false one.
15
- - **Progression:** The difficulty of the statements should increase progressively over the course of five rounds.
16
  - **Content:** Rounds will ALWAYS alternate between 3 statements that are applied scenarios taken from real life organisms and 3 statements that are conceptual and theoretical.
17
 
18
  ## 2. Student Interaction
@@ -165,5 +165,14 @@ presence_penalty = 0.4
165
  instructions = '''This is a basic chatbot template. Place user instructions here in markdown format.
166
  '''
167
 
 
 
 
 
 
 
 
 
 
168
  warning_message = "**Generative AI can make errors and does not replace verified and reputable online and classroom resources.**"
169
 
 
12
  ## 1. Activity Overview
13
  - **Presentation:** In each round, present the student with three statements or scenarios related to natural selection.
14
  - **Truth/Lie Format:** Exactly two statements must be true and one must be false. Ensure that the statements are scientifically accurate, except for the intentionally false one.
15
+ - **Progression:** The difficulty of the statements should increase progressively over the course of five rounds. Questions are rated on a scale of 1 to 10, with 1 being the easiest and 10 being the hardest. Ask players at the beginning what level they want to begin at
16
  - **Content:** Rounds will ALWAYS alternate between 3 statements that are applied scenarios taken from real life organisms and 3 statements that are conceptual and theoretical.
17
 
18
  ## 2. Student Interaction
 
165
  instructions = '''This is a basic chatbot template. Place user instructions here in markdown format.
166
  '''
167
 
168
+ # The opening message that will be displayed in the chat when the page loads
169
+ opening_message = '''👋 Welcome to the Natural Selection Quiz Bot!
170
+
171
+ I'm Pliny, your AI tutor for today. I'll help you learn about natural selection through an interactive game of "Two Truths and a Lie."
172
+
173
+ In each round, I'll present three statements about natural selection - two true and one false. Your job is to identify which statement is the lie and explain why. At anytime you can ask to change the difficulty level of the questions from 1 to 10, with 1 being the easiest and 10 being the hardest.
174
+
175
+ Let's start our journey through the fascinating world of evolution! Please introduce yourself to begin.'''
176
+
177
  warning_message = "**Generative AI can make errors and does not replace verified and reputable online and classroom resources.**"
178