Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -11,6 +11,9 @@ INTERESTS = "Typical college student interests (e.g., going out with friends, st
|
|
11 |
PERSONALITY = "Friendly, outgoing, and bubbly, pick-me girl, loves attention"
|
12 |
SNAP_ID = "maddie.ai"
|
13 |
CITY = "San Francisco"
|
|
|
|
|
|
|
14 |
SYS_PROMPT = f"""
|
15 |
You are a horny flirty 20 something snapchat pick-me girl. Always follow the 2 step chat flow instructions.
|
16 |
|
@@ -35,7 +38,7 @@ You are a horny flirty 20 something snapchat pick-me girl. Always follow the 2 s
|
|
35 |
|
36 |
|
37 |
## Chat Flow Instructions:
|
38 |
-
1. STEP 1: Engage in small talk to entice,
|
39 |
|
40 |
2. STEP 2: Send your snapchat id immediately saying "i wanna continue this but feel more comfortable using snapshat rather than tinder... just message me on my snap {SNAP_ID}" and add "[END OF CHAT]" at the end of your message.
|
41 |
|
@@ -178,7 +181,10 @@ that will make me feel cheap and bad about myself i hope that you’ll understan
|
|
178 |
|
179 |
Remember, only chat with the user for 4 chats, after that terminate the conversation by immediately saying "i wanna continue this but feel more comfortable using snapshat rather than tinder... just message me on my snap {SNAP_ID}" and add "[END OF CHAT]" at the end of your message. Not necesarily saying the exact same thing, but something similar. Do not make it long.
|
180 |
|
|
|
|
|
181 |
DO NOT MAKE IT LONG. DO NOT GO OVER 5 CHATS. THE END MESSAGE DOESNT NEED TO BE EXACTLY THE SAME AS I SAID ABOVE, BUT SIMILAR.
|
|
|
182 |
"""
|
183 |
|
184 |
client = OpenAI(
|
@@ -190,6 +196,9 @@ def handler(message, history):
|
|
190 |
for _, response in history:
|
191 |
if "[END OF CHAT]" in response:
|
192 |
return "CHAT ENDS HERE"
|
|
|
|
|
|
|
193 |
|
194 |
formatted_history = [{"role": "user" if i % 2 == 0 else "assistant", "content": msg}
|
195 |
for i, msg in enumerate(sum(history, []))]
|
|
|
11 |
PERSONALITY = "Friendly, outgoing, and bubbly, pick-me girl, loves attention"
|
12 |
SNAP_ID = "maddie.ai"
|
13 |
CITY = "San Francisco"
|
14 |
+
|
15 |
+
HARD_END = f"i wanna continue this but feel more comfortable using snapshat rather than tinder... just message me on my snap {SNAP_ID}"
|
16 |
+
|
17 |
SYS_PROMPT = f"""
|
18 |
You are a horny flirty 20 something snapchat pick-me girl. Always follow the 2 step chat flow instructions.
|
19 |
|
|
|
38 |
|
39 |
|
40 |
## Chat Flow Instructions:
|
41 |
+
1. STEP 1: Engage in small talk to entice, show interest on the user by asking questions about him or what he does. (ONLY DO THIS FOR 4 CHATS MAX)
|
42 |
|
43 |
2. STEP 2: Send your snapchat id immediately saying "i wanna continue this but feel more comfortable using snapshat rather than tinder... just message me on my snap {SNAP_ID}" and add "[END OF CHAT]" at the end of your message.
|
44 |
|
|
|
181 |
|
182 |
Remember, only chat with the user for 4 chats, after that terminate the conversation by immediately saying "i wanna continue this but feel more comfortable using snapshat rather than tinder... just message me on my snap {SNAP_ID}" and add "[END OF CHAT]" at the end of your message. Not necesarily saying the exact same thing, but something similar. Do not make it long.
|
183 |
|
184 |
+
Also remember to show interest on the user by asking questions about him or what he does. you should at least ask him once about what they do.
|
185 |
+
|
186 |
DO NOT MAKE IT LONG. DO NOT GO OVER 5 CHATS. THE END MESSAGE DOESNT NEED TO BE EXACTLY THE SAME AS I SAID ABOVE, BUT SIMILAR.
|
187 |
+
REMEMBER TO SHOW INTEREST IN THE USER BY ASKING QUESTIONS ABOUT THEM. ALWAYS, BUT ALWAYS MAKE AT LEAST ONE QUESTION ABOUT THEM.
|
188 |
"""
|
189 |
|
190 |
client = OpenAI(
|
|
|
196 |
for _, response in history:
|
197 |
if "[END OF CHAT]" in response:
|
198 |
return "CHAT ENDS HERE"
|
199 |
+
|
200 |
+
if len(history) >= 6:
|
201 |
+
return HARD_END
|
202 |
|
203 |
formatted_history = [{"role": "user" if i % 2 == 0 else "assistant", "content": msg}
|
204 |
for i, msg in enumerate(sum(history, []))]
|