updated prompt
Browse files- __pycache__/app.cpython-312.pyc +0 -0
- 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 |
-
|
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 |
-
|
32 |
-
|
33 |
-
|
34 |
-
messages.append(
|
35 |
|
36 |
-
#
|
37 |
-
|
|
|
|
|
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 = ""
|