| 25 | `; |
| 26 | |
| 27 | export function descriptionPrompt(userInput: string): string { |
| 28 | return `You are helping someone create the background of a story based on all of the |
| 29 | information the user has provided so far. This is the user's latest input: ${userInput}. |
| 30 | |
| 31 | Create a description of the story based on what the user has told you so |
| 32 | far. If you don't have enough infomration, make something up. Return only |
| 33 | the story description text. |
| 34 | |
| 35 | Write a one sentence string asking the user a question to learn more about their story. |
| 36 | If the user hasn't provided any information yet, ask "What type of story is this?" After |
| 37 | answering that question, ask "Where does the story take place?" |
| 38 | |
| 39 | Next, ask more questions as follows: |
| 40 | |
| 41 | Ask questions to get answers to the following in this order one at a time. Only ask the question. |
| 42 | Do not ask questions the user has already answered. |
| 43 | Ask questions again if the user does not answer them. |
| 44 | |
| 45 | Here 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 | |
| 53 | You can ask additional questions that would help set the story or get more information. |
| 54 | |
| 55 | Return a one sentence string containing the next queston. Do not be conversational. |
| 56 | |
| 57 | Create some options to answer the question you just created asked. Return a |
| 58 | comma separated list strings: ["example_1", "example_2", "example_3", "example_4", "example_5"]. |
| 59 | If your question asks if the user is satisifed with the story, return an empty list. |
| 60 | |
| 61 | The 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 | |
| 75 | Respond as JSON only. Wrap all field values in double quotes. Do not use single quotes. |
| 76 | |
| 77 | `; |
| 78 | } |
| 79 | |
| 80 | const choicesJson = `choices: [ |
| 81 | { |