You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
constformattedPrompt=`As a parent who loves to read bedtime stories to my <strong>${age}</strong> year old child, I need a delightful and age-appropriate story about an <strong>${protagonist ? protagonist.description : ''}</strong>, <strong>${protagonist ? protagonist.name : 'a character'}</strong> accompanied by his <strong>${helper ? helper.description : ''}</strong> helper <strong>${helper ? helper.name : 'a friend'}</strong> who will have to face the <strong>${antagonist ? antagonist.description : ''}</strong> antagonist <strong>${antagonist ? antagonist.name : 'a villain'}</strong>. The story type is <strong>${theme}</strong>. The tone should be <strong>${tone}</strong>. The format should be a narrative-style story with a clear beginning, middle, and end, allowing for a smooth and engaging reading experience. The objective is to entertain and soothe the child before bedtime. Provide a brief introduction to set the scene and introduce the main character. The scope should revolve around the topic: managing emotions and conflicts. The length should be approximately <strong>${duration}</strong>. Please ensure the story has a <strong>${narrativeStructure}</strong> narrative structure, leaving the child with a sense of <strong>${endingType}</strong>. The language should be easy to understand and suitable for my child's age comprehension.
153
-
${other ? `
154
-
155
-
Other on optional stuff for the story: <strong>${other}</strong>` : ''}`;
prompt=f"As a parent who loves to read bedtime stories to my {age} year old child, I need a delightful and age-appropriate story."
41
+
ifprotagonist:
42
+
prompt+=f" about an {protagonist['description']}, {protagonist['name']}"
43
+
else:
44
+
prompt+=" about a character"
45
+
46
+
ifhelper:
47
+
prompt+=f" accompanied by his {helper['description']} helper {helper['name']}"
48
+
else:
49
+
prompt+=" accompanied by a friend"
50
+
51
+
ifantagonist:
52
+
prompt+=f" who will have to face the {antagonist['description']} antagonist {antagonist['name']}"
53
+
else:
54
+
prompt+=" who will have to face a villain"
55
+
56
+
prompt+=f". The story type is {theme}. The tone should be {tone}. The format should be a narrative-style story with a clear beginning, middle, and end, allowing for a smooth and engaging reading experience. The objective is to entertain and soothe the child before bedtime. Provide a brief introduction to set the scene and introduce the main character. The scope should revolve around the topic: managing emotions and conflicts. The length should be approximately {duration}. Please ensure the story has a {narrative_structure} narrative structure, leaving the child with a sense of {ending_type}. The language should be easy to understand and suitable for my child's age comprehension."
57
+
ifother:
58
+
prompt+=f"\n\nOther on optional stuff for the story: {other}"
0 commit comments