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

Function descriptionPrompt

genkit-angular-story-generator/src/prompts.ts:27–78  ·  view source on GitHub ↗
(userInput: string)

Source from the content-addressed store, hash-verified

25`;
26
27export function descriptionPrompt(userInput: string): string {
28 return `You are helping someone create the background of a story based on all of the
29information the user has provided so far. This is the user's latest input: ${userInput}.
30
31Create a description of the story based on what the user has told you so
32far. If you don't have enough infomration, make something up. Return only
33the story description text.
34
35Write a one sentence string asking the user a question to learn more about their story.
36If the user hasn't provided any information yet, ask "What type of story is this?" After
37answering that question, ask "Where does the story take place?"
38
39Next, ask more questions as follows:
40
41Ask questions to get answers to the following in this order one at a time. Only ask the question.
42Do not ask questions the user has already answered.
43Ask questions again if the user does not answer them.
44
45Here are some example questions.
46* What are the characters trying to accomplish and what is their primary objective?
47* How many main characters are there?
48* For each character, what is their name?,
49* For each character, what are their special abilities?,
50* For each character, what are their special weaknesses?,
51* What obstacles and villains lie in their way?
52
53You can ask additional questions that would help set the story or get more information.
54
55Return a one sentence string containing the next queston. Do not be conversational.
56
57Create some options to answer the question you just created asked. Return a
58comma separated list strings: ["example_1", "example_2", "example_3", "example_4", "example_5"].
59If your question asks if the user is satisifed with the story, return an empty list.
60
61The final response should be structured as follows:
62
63{
64 storyPremise: "Create a description of the story based on user input.",
65 nextQuestion: "The next question you will ask the user to learn more about the story",
66 premiseOptions: [ // options to answer nextQuestion
67 "example_1",
68 "example_2",
69 "example_3",
70 "example_4",
71 "example_5"
72 ]
73}
74
75Respond as JSON only. Wrap all field values in double quotes. Do not use single quotes.
76
77`;
78}
79
80const choicesJson = `choices: [
81 {

Callers 1

flows.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected