File size: 9,409 Bytes
c315347
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "27f5e159",
   "metadata": {},
   "outputs": [],
   "source": [
    "from dotenv import load_dotenv\n",
    "from openai import OpenAI\n",
    "from IPython.display import Markdown, display"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "4128260f",
   "metadata": {},
   "outputs": [],
   "source": [
    "request = \"Please can you come up a plan that is easier for me to sleep instantly and deeply\"\n",
    "request += \"you have to answer for someone who is addict to Lust\"\n",
    "messages = [{\"role\": \"user\", \"content\": request}]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "f8c70f82",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/markdown": [
       "First — brief empathy: struggling with compulsive sexual thoughts/urges makes falling asleep harder for many people. Below is a practical, non-judgmental plan you can use tonight and build into a longer-term routine. Use what fits you and skip anything that feels triggering; if urges are harming you or others, please seek professional help (therapist/physician/specialist in compulsive sexual behavior).\n",
       "\n",
       "Quick 5-minute “get-to-sleep” routine (use when you’d like to fall asleep right now)\n",
       "- Get out of bed if you’ve been thrashing, look at the clock only briefly, then return to bed.\n",
       "- 4-7-8 breathing (one of the fastest calming tools):\n",
       "  - Breathe in quietly through your nose for 4 seconds.\n",
       "  - Hold for 7 seconds.\n",
       "  - Exhale slowly through your mouth for 8 seconds.\n",
       "  - Repeat 4–8 times. Focus on the breath count and the sensation of air.\n",
       "- Progressive muscle relaxation (fast version, 2–3 minutes):\n",
       "  - Starting at your toes, tense that muscle group for 5 seconds, then fully relax for 10 seconds. Move up calves, thighs, buttocks, abdomen, chest, hands, arms, shoulders, neck, face.\n",
       "- If sexual thoughts/urges appear, use “noting” + grounding:\n",
       "  - Mentally label the experience: “Thought: sexual desire” or “Sensation: urge.” Don’t judge it.\n",
       "  - Say to yourself: “This is a feeling. It will change.” Bring attention back to the breath.\n",
       "  - If the mind races, count backward slowly from 100 by 7s or visualize a calm scene (walking on a beach, feel feet on sand).\n",
       "- If you can’t sleep after 20 minutes, get out of bed and do a quiet, neutral activity (read a physical book under dim light, fold laundry, wash your face), then try again.\n",
       "\n",
       "Nightly sleep-lifestyle plan (builds deeper sleep over weeks)\n",
       "1. Sleep schedule and stimulus control\n",
       "   - Fixed wake time every day (including weekends). Fix bedtime to allow 7–9 hours.\n",
       "   - Bed = sleep (and mutually agreed sex only). No screens, eating, or browsing in bed.\n",
       "   - If awake >20 minutes, get out of bed and do a non-stimulating task.\n",
       "\n",
       "2. Pre-bed wind-down routine (start 60–90 minutes before sleep)\n",
       "   - Turn off screens/blue light 60–90 minutes before bed. Use app blockers and remove access to any pornographic sites on phone/computer.\n",
       "   - Do low-stimulation activities: reading, light stretching, bath/shower, journaling (see next).\n",
       "   - Build a short nightly journal ritual: write down sexual urges or intrusive sexual thoughts that came up during the day and one action you’ll take tomorrow to reduce triggers. This “offloads” the mind.\n",
       "\n",
       "3. Manage triggers / curtail arousal before bed\n",
       "   - Avoid explicit content, seductive media, or stimulating chat for several hours before sleep.\n",
       "   - Replace any bedtime sexual routines (masturbation to porn) with neutral alternatives: warm shower, listen to calming podcast/music, meditation.\n",
       "   - Move exercise earlier in the day; vigorous late-night exercise can raise arousal. A gentle evening walk is fine.\n",
       "\n",
       "4. Urge-management tools (when urges are strong)\n",
       "   - Urge surfing: Notice the urge, give it a number 1–10, breathe and watch it without acting. Most urges peak and fall within 20–30 minutes.\n",
       "   - Delay and redirect: Tell yourself “I’ll wait 20 minutes.” Then get up, do a neutral task (15–20 minutes) and return to bed.\n",
       "   - Stimulus control: keep devices out of the bedroom, use content filters, change passwords, use accountability software if helpful.\n",
       "   - Physical reset: splash cold water on your face or wash hands (quickly reduces arousal in many people without stimulating further).\n",
       "\n",
       "5. Sleep environment\n",
       "   - Keep bedroom cool (around 16–19°C / 60–67°F).\n",
       "   - Make it dark (blackout curtains) and quiet (earplugs or white noise).\n",
       "   - Comfortable mattress and pillow.\n",
       "   - Bed used for sleep (and consensual sex only) — this strengthens sleep association and reduces conditioned sexual arousal in bed.\n",
       "\n",
       "6. Daytime habits for better sleep and impulse control\n",
       "   - Morning bright light exposure (15–30 minutes) to reset circadian rhythm.\n",
       "   - Regular moderate exercise (not right before bed).\n",
       "   - Limit caffeine after early afternoon; avoid alcohol before bed (it fragments sleep).\n",
       "   - Healthy diet, regular meals, drink water earlier in the day.\n",
       "\n",
       "7. Quick mental tools to interrupt sexual thoughts\n",
       "   - Replace the sexual thought with a neutral but engaging cognitive task: list 10 cities, name 20 animals, or recite a poem line-by-line.\n",
       "   - Mindfulness “noting” (label thoughts/urges and let them pass).\n",
       "   - Visualization of a neutral scene (count beach waves, feel floor under feet).\n",
       "\n",
       "8. Helpful aids (use with care)\n",
       "   - Sleep sounds apps or white noise machines.\n",
       "   - Blue-light filters or glasses.\n",
       "   - Short-term melatonin (0.5–3 mg 30–60 min before bedtime) can help reset sleep timing; discuss with your doctor before starting.\n",
       "   - Cognitive Behavioral Therapy for Insomnia (CBT-I) is highly effective — online programs and apps exist.\n",
       "\n",
       "When to seek help\n",
       "- If urges cause you distress, harm your relationships or work, or you can’t control them despite trying — see a therapist experienced in compulsive sexual behavior / hypersexuality or a psychiatrist. Treatments often include CBT, acceptance and commitment therapy (ACT), group support (e.g., Sex Addicts Anonymous), and sometimes medication (a clinician decides).\n",
       "\n",
       "Example 20-minute bedtime sequence to try tonight\n",
       "- 90 minutes prior: stop screens; dim lights.\n",
       "- 60 minutes prior: light snack if needed, shower, put on comfortable clothes.\n",
       "- 30 minutes prior: 10 minutes journaling—write down urges/thoughts and a plan for tomorrow.\n",
       "- 15 minutes prior: gentle stretch + 5 minutes 4-7-8 breathing.\n",
       "- In bed: progressive muscle relaxation + noting technique when urges arise.\n",
       "\n",
       "If you want, I can give:\n",
       "- A 10-minute guided script for progressive muscle relaxation and body scan.\n",
       "- A printable quick checklist to put on your nightstand.\n",
       "- Specific app or blocking tool recommendations.\n",
       "\n",
       "Would you like the guided relaxation script or the checklist next?"
      ],
      "text/plain": [
       "<IPython.core.display.Markdown object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "CompletionUsage(completion_tokens=2273, prompt_tokens=34, total_tokens=2307, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=896, rejected_prediction_tokens=0), prompt_tokens_details=PromptTokensDetails(audio_tokens=0, cached_tokens=0))\n"
     ]
    }
   ],
   "source": [
    "openai = OpenAI()\n",
    "response = openai.chat.completions.create(\n",
    "    model=\"gpt-5-mini\",\n",
    "    messages=messages,\n",
    ")\n",
    "\n",
    "question = response.choices[0].message.content\n",
    "\n",
    "display(Markdown(question))\n",
    "print(response.usage)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "6591fe27",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "agents (3.12.5)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.12.5"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}