willbraun commited on
Commit
db45ec4
1 Parent(s): 6486f3f

updated prompt

Browse files
Files changed (2) hide show
  1. __pycache__/app.cpython-312.pyc +0 -0
  2. app.py +9 -9
__pycache__/app.cpython-312.pyc CHANGED
Binary files a/__pycache__/app.cpython-312.pyc and b/__pycache__/app.cpython-312.pyc differ
 
app.py CHANGED
@@ -20,21 +20,21 @@ def respond(user_input, history):
20
 
21
  # Track guessed words from history
22
  last_human_message, last_ai_message = history[-1] if history else ("", "")
23
- # guessed_words_summary = "Past guesses: " + ", ".join() if guessed_words else "No past guesses."
24
- # print(guessed_words_summary)
25
  # Add messages to the conversation
26
  messages = [
27
  SystemMessage(content=system_message),
28
- SystemMessage(content="Last human message: " + last_human_message + " | Last AI message: " + last_ai_message),
29
  ]
30
 
31
- # Load past conversation into messages
32
- for human, ai in history:
33
- messages.append(HumanMessage(content=human))
34
- messages.append(AIMessage(content=ai))
35
 
36
- # Add the current user input
37
- messages.append(HumanMessage(content=user_input))
 
 
38
 
39
  # Initialize response as an empty string
40
  response = ""
 
20
 
21
  # Track guessed words from history
22
  last_human_message, last_ai_message = history[-1] if history else ("", "")
23
+
 
24
  # Add messages to the conversation
25
  messages = [
26
  SystemMessage(content=system_message),
 
27
  ]
28
 
29
+ if last_human_message:
30
+ messages.append(SystemMessage(content="Pick a word that is similar to both " + last_human_message + " and " + last_ai_message))
31
+ else:
32
+ messages.append(SystemMessage(content="First message. Pick a random word!"))
33
 
34
+ # Load past conversation into messages
35
+ # for human, ai in history:
36
+ # messages.append(HumanMessage(content=human))
37
+ # messages.append(AIMessage(content=ai))
38
 
39
  # Initialize response as an empty string
40
  response = ""