Browse Source

Minor fixes:

* Avoid showing system message content in history
* Bug in schema (wrong video_content dependency)
* Add/replace video-embeds
* Rephrase odelia to avoid "compulsory color schtick"
master
The Dod 1 month ago
parent
commit
3c9d03b746
5 changed files with 27 additions and 12 deletions
  1. 2
    1
      app.py
  2. 1
    1
      static/chat.schema.json
  3. 4
    2
      static/css/style.css
  4. 19
    7
      static/media/video-embed.json
  5. 1
    1
      static/users/odelia.txt

+ 2
- 1
app.py View File

@@ -168,7 +168,8 @@ def home():
168 168
         payload = json.loads(session["messages"][-1]["content"])
169 169
         payload["content"] = preprocess_content(payload)
170 170
         try:
171
-            payload["prompt"] = session["messages"][-2]["content"]
171
+            if session["messages"][-2]["role"] == "user":
172
+                payload["prompt"] = session["messages"][-2]["content"]
172 173
         except exception as e:
173 174
             print(e)
174 175
     payload["history"] = list(reversed(session.get("history", [])[:-1]))

+ 1
- 1
static/chat.schema.json View File

@@ -62,7 +62,7 @@
62 62
     },
63 63
     "video_content": {
64 64
       "dependencies": {
65
-        "use_soundtrack": true
65
+        "use_video_content": true
66 66
       },
67 67
       "type": "string",
68 68
       "title": "Video content",

+ 4
- 2
static/css/style.css View File

@@ -49,7 +49,7 @@
49 49
 
50 50
 .reveal .slides .small,
51 51
 .modal .small {
52
-	font-size: 80%;
52
+	font-size: 75%;
53 53
 }
54 54
 
55 55
 .reveal .slides ul {
@@ -97,6 +97,7 @@
97 97
 	background-color: #ffffff3f;
98 98
 	border-radius: 1rem;
99 99
 	padding: 1rem;
100
+	font-size: 80%;
100 101
 }
101 102
 .prompt {
102 103
 	width:97%;
@@ -118,7 +119,8 @@
118 119
 .iframe-container-4x3 {
119 120
     /* background-image: url('../misc/wood-background.jpg'); */
120 121
     /* background-size: cover; */
121
-    margin: 0.5em auto;
122
+    margin: 0.4em 0.4em 0 0;
123
+    float: left;
122 124
 }
123 125
 
124 126
 

+ 19
- 7
static/media/video-embed.json View File

@@ -24,12 +24,6 @@
24 24
         "description": "Notice when others are Suffering .... and Offer True Presence. Practice Deep Breathing to restore yourself .... so You can Help. Thich Nhat Hanh"
25 25
     },
26 26
     {
27
-        "id": "Guided_Meditation_Release_Stress",
28
-        "url": "https://www.youtube.com/watch?v=vLhOGEnEedk",
29
-        "proportions": "16x9",
30
-        "description": "This is a 2-minute guided meditation, that shows you how to relieve stress. Use this anytime you need to let go of tension and feel more relaxed"
31
-    },
32
-    {
33 27
         "id": "coping_with_grief",
34 28
         "url": "https://www.youtube.com/watch?v=gsYL4PC0hyk",
35 29
         "proportions": "16x9",
@@ -46,5 +40,23 @@
46 40
         "url": "https://www.youtube.com/watch?v=A33hN1tDopY",
47 41
         "proportions": "16x9",
48 42
         "description": "This meditation is designed to help reduce chronic pain. The relaxation response will counteract the effects of stress and help to reduce pain. Relaxation techniques are safe for anyone to use and do not have the side effects of pain medication."
43
+    },
44
+    {
45
+        "id": "2_Minute_Guided_Meditation_for_Spring",
46
+        "url": "https://www.youtube.com/watch?v=-V3OU_NF4qs",
47
+        "proportions": "16x9",
48
+        "description": "2 Minute Guided Mindful Meditation for Spring: Take a quick break to enjoy this spring-inspired guided meditation."
49
+    },
50
+    {
51
+        "id": "2_Minute_Guided_Meditation_for_Winter",
52
+        "url": "https://www.youtube.com/watch?v=ZJGgpfx01KE",
53
+        "proportions": "16x9",
54
+        "description": "2 Minute Guided Mindful Meditation for Winter: Take a quick break to enjoy this winter scene guided meditation."
55
+    },
56
+    {
57
+        "id": "One_minute_guided_meditation",
58
+        "url": "https://www.youtube.com/watch?v=w-KD1rFZgDg",
59
+        "proportions": "16x9",
60
+        "description": "One minute guided meditation: Take time to slow down... Deep breathing and guided meditation will relieve stress in the body and mind."
49 61
     }
50
-]
62
+]

+ 1
- 1
static/users/odelia.txt View File

@@ -1 +1 @@
1
-User is Odelia, 48 years old, Israeli secular Jew, living in Tel-Aviv, practicing Buddhist meditations and loves East Asian texts since her visits to India and Thailand. she was recently informed that her cancer is incurable and had to retire from a career in the television industry. she is a single mother to an 8 year old  daughter called Dalit. She is in financial hardship on top of her health problems and loneliness anxiety. Odelia likes to be asked about the meaning of her name and about characters in books and movies that she can identify with. She also likes games such as “what color do you feel like today”. During her last conversation with the assistant she expressed fear of death and talked about the difficulty of telling Dalit that she was about to leave her.
1
+User is Odelia, 48 years old, Israeli secular Jew, living in Tel-Aviv, practicing Buddhist meditations and loves East Asian texts since her visits to India and Thailand. she was recently informed that her cancer is incurable and had to retire from a career in the television industry. she is a single mother to an 8 year old  daughter called Dalit. She is in financial hardship on top of her health problems and loneliness anxiety. Odelia likes to be asked about the meaning of her name and about characters in books, movies, colors that she can identify with or associate with the conversation topic. Examples: "which actress should play your sister?", "What color does this song sound like to you?". During her last conversation with the assistant she expressed fear of death and talked about the difficulty of telling Dalit that she was about to leave her.

Loading…
Cancel
Save