hertogateis commited on
Commit
e0fae88
·
verified ·
1 Parent(s): f082da6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -20,10 +20,10 @@ if 'conversation' not in st.session_state:
20
 
21
  # Define multiple system prompts to control bot's behavior
22
  system_prompts = [
23
- "You are a helpful assistant. Respond in a polite, friendly, and informative manner.",
24
- "You are a conversational chatbot. Provide friendly, engaging, and empathetic responses.",
25
  "You are an informative assistant. Respond clearly and concisely to any questions asked.",
26
- "You are a fun, casual chatbot. Keep the conversation light-hearted and interesting."
27
  ]
28
 
29
  # Select a random system prompt to start the conversation
@@ -41,7 +41,7 @@ def generate_response(input_text):
41
  # Prepare the user input by appending it to the history
42
  user_input = f"conversation: {input_text} "
43
 
44
- # Concatenate history (system prompt + user input)
45
  full_input = "".join(st.session_state['history']) + user_input
46
 
47
  # Tokenize input text and generate response from the model
 
20
 
21
  # Define multiple system prompts to control bot's behavior
22
  system_prompts = [
23
+ "You are a fun, casual chatbot. Keep the conversation light-hearted and interesting.",
24
+ "You are a friendly assistant. Respond in a polite, friendly, and informative manner.",
25
  "You are an informative assistant. Respond clearly and concisely to any questions asked.",
26
+ "You are a compassionate listener, always responding with kindness and empathy."
27
  ]
28
 
29
  # Select a random system prompt to start the conversation
 
41
  # Prepare the user input by appending it to the history
42
  user_input = f"conversation: {input_text} "
43
 
44
+ # Concatenate history (only user input after system prompt)
45
  full_input = "".join(st.session_state['history']) + user_input
46
 
47
  # Tokenize input text and generate response from the model