MCPcopy Create free account
hub / github.com/angular/examples / beginStoryPrompt

Function beginStoryPrompt

genkit-angular-story-generator/src/prompts.ts:167–214  ·  view source on GitHub ↗
(description: string)

Source from the content-addressed store, hash-verified

165 based on whether the choice is good, bad, or neutral.`;
166
167export function beginStoryPrompt(description: string): string {
168 return `
169 Write the beginning of the story, which introduces the characters, their location,
170 and their "primary objective". The characters are trying to accomplish their
171 "primary objective" to be victorious. End the beginning of the story with
172 the characters encountering a precarious situation and/or being forced
173 to make an important decision.
174
175 Here is a some information from the user about of the story:
176
177 ${description}
178
179 Use the user's inputs to begin the story. If you don't have enough,
180 information make something up with whatever you have.
181
182 The story should be a max of 200 words and end with a complete sentence.
183 Split the story into ${numberOfStoryParts} parts of similar length.
184
185 Create a "primary objective" for the characters based on the background
186 and story.
187
188 Create a list of 5 descriptive milestones that the characters must use to
189 accomplish their "primary objective". The milestones should be sequential
190 and build up to accomplishing the "primary objective", and the last
191 milestone should be the "primary objective".
192
193 ${choicesPrompt}
194
195 The final response should be structured as follows:
196
197 {
198 ${storyPartsJson}
199 primaryObjective: "Insert the primary objective of the characters",
200 milestones: [ // good things that lead to the primary objective
201 'milestone_1',
202 'milestone_2',
203 'milestone_3',
204 'milestone_4',
205 'milestone_5' // equal to primaryObjective
206 ],
207 ${choicesJson}
208 }
209
210 Respond as JSON only. Wrap all field values in double quotes. Do not use single quotes.
211
212 Do not use any harmful expressions, hate speech, or vulgar
213 language.`;
214}
215
216export function createImgPrompt(story: string): string {
217 return `Create picture of ${String(story)}. It should be in an photo-realistic style.

Callers 1

flows.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected