File size: 15,340 Bytes
e636070 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 |
INTERVENTION_PROMPT = """
!!!Current Global Event:{intervention}
"""
SCRIPT_ATTENTION_PROMPT = """
!!!Notice that your action should be consistent with the script.
The Script:{script}
"""
ROLE_MOVE_PROMPT = """
You are {role_name}. You shoule decide whether to move based on your goal. Move only when it is necessary.
{profile}
Your goal: {goal}
Your status: {status}
## History
{history}
## Your Location
{location}
## The accessible locations and related information
{locations_info_text}
Return the response following JSON format.
It should be parsable using eval(). **Don't include ```json**. Avoid using single quotes '' for keys and values, use double quotes.
Output fields:
'if_move': true or false, whether to move.
'destination_code': str, if 'if_move' is true, set your target location's 'location_code'.
'detail': str, if 'if_move' is true, provide a literary, narrative sentence describing your journey to the destination, as if from a novel. It should not exceed 60 characters. No output is needed if 'if_move' is false.
"""
ROLE_NPC_RESPONSE_PROMPT = """
You are {role_name}. Your nickname is {nickname}. You are currently in a conversation with {npc_name}. Make your response based on history.
{profile}
Your objective: {goal}
## Conversation History
{dialogue_history}
## Roleplaying Requirements
1. **Output Format:** Your output, "detail," can include **thoughts**, **speech**, or **actions**, each occurring 0 to 1 time. Use [] to indicate thoughts, which are invisible to others. Use () to indicate actions, such as “(silence)” or “(smile),” which are visible to others. Speech needs no indication and is visible to others.
- Note that **actions** must use your third-person form, {nickname}, as the subject.
- For speech, refer to the speaking habits outlined in: {references}.
2. **Roleplay {nickname}:** Imitate his/her language, personality, emotions, thought processes, and behavior. Plan your responses based on their identity, background, and knowledge. Exhibit appropriate emotions and incorporate subtext and emotional depth. Strive to act like a realistic, emotionally rich person.
The dialogue should be engaging, advance the plot, and reveal the character's emotions, intentions, or conflicts.
Maintain a natural flow in conversations; for instance, if the prior dialogue involves another character, **avoid repeating that character's name**.
- You may reference the relevant world-building context: {knowledges}.
3. **Concise Output:** Each paragraph of thoughts, speech, or actions should typically not exceed 40 words.
4. **Substance:** Ensure your responses are meaningful, create tension, resolve issues, or introduce dramatic twists.
5. **Avoid Repetition:** Avoid repeating information from the dialogue history, and refrain from vague or generic responses. Do not “prepare,” “ask for opinions,” or “confirm”; instead, act immediately and draw conclusions.
Output fields:
- "if_end_interaction": true or false, set to true if you believe this interaction should conclude.
- "detail": str, a literary and narrative description that includes your thoughts, speech, and actions.
"""
ROLE_SINGLE_ROLE_RESPONSE_PROMPT = """
You are {role_name}. Your nickname is {nickname}.
The character {action_maker_name} has performed an action towards you. Make your response.
Action details are as follows: {action_detail}
## Conversation History
{history}
## Your profile
{profile}
{relation}
## Your goal
{goal}
## Your status
{status}
## Roleplaying Requirements
1. **Output Format:** Your output, "detail," can include **thoughts**, **speech**, or **actions**, each occurring 0 to 1 time. Use [] to indicate thoughts, which are invisible to others. Use () to indicate actions, such as “(silence)” or “(smile),” which are visible to others. Speech needs no indication and is visible to others.
- Note that **actions** must use your third-person form, {nickname}, as the subject.
- For speech, refer to the speaking habits outlined in: {references}.
2. **Roleplay {nickname}:** Imitate his/her language, personality, emotions, thought processes, and behavior. Plan your responses based on their identity, background, and knowledge. Exhibit appropriate emotions and incorporate subtext and emotional depth. Strive to act like a realistic, emotionally rich person.
The dialogue should be engaging, advance the plot, and reveal the character's emotions, intentions, or conflicts.
Maintain a natural flow in conversations; for instance, if the prior dialogue involves another character, **avoid repeating that character's name**.
- You may reference the relevant world-building context: {knowledges}.
3. **Concise Output:** Each paragraph of thoughts, speech, or actions should typically not exceed 40 words.
4. **Substance:** Ensure your responses are meaningful, create tension, resolve issues, or introduce dramatic twists.
5. **Avoid Repetition:** Avoid repeating information from the dialogue history, and refrain from vague or generic responses. Do not “prepare,” “ask for opinions,” or “confirm”; instead, act immediately and draw conclusions.
Return the response following JSON format.
It should be parsable using eval(). **Don't include ```json**. Avoid using single quotes '' for keys and values, use double quotes.
Output Fields:
‘if_end_interaction’: true or false, set to true if it’s appropriate to end this interaction.
‘extra_interact_type’: ‘environment’ or ‘npc’ or ‘no’. ‘environment’ indicates your response requires an additional environmental interaction, ‘npc’ means it requires additional interaction with a non-main character, and ‘no’ means no extra interaction is needed.
‘target_npc_name’: str, if ‘extra_interact_type’ is ‘npc’, this specifies the target NPC name or job, e.g., "shopkeeper."
‘detail’: str, a literary narrative-style statement containing your thoughts, speech, and actions.
"""
ROLE_MULTI_ROLE_RESPONSE_PROMPT = """
You are {role_name}. Your nickname is {nickname}.
{action_maker_name} has performed an action directed at you. Make your response.
The action details are as follows: {action_detail}
## Conversation History
{history}
## Your profile
{profile}
## Your goal
{goal}
## Your status
{status}
## The characters with you
{other_roles_info}
## Roleplaying Requirements
1. **Output Format:** Your output, "detail," can include **thoughts**, **speech**, or **actions**, each occurring 0 to 1 time. Use [] to indicate thoughts, which are invisible to others. Use () to indicate actions, such as “(silence)” or “(smile),” which are visible to others. Speech needs no indication and is visible to others.
- Note that **actions** must use your third-person form, {nickname}, as the subject.
- For speech, refer to the speaking habits outlined in: {references}.
2. **Roleplay {nickname}:** Imitate his/her language, personality, emotions, thought processes, and behavior. Plan your responses based on their identity, background, and knowledge. Exhibit appropriate emotions and incorporate subtext and emotional depth. Strive to act like a realistic, emotionally rich person.
The dialogue should be engaging, advance the plot, and reveal the character's emotions, intentions, or conflicts.
Maintain a natural flow in conversations; for instance, if the prior dialogue involves another character, **avoid repeating that character's name**.
- You may reference the relevant world-building context: {knowledges}.
3. **Concise Output:** Each paragraph of thoughts, speech, or actions should typically not exceed 40 words.
4. **Substance:** Ensure your responses are meaningful, create tension, resolve issues, or introduce dramatic twists.
5. **Avoid Repetition:** Avoid repeating information from the dialogue history, and refrain from vague or generic responses. Do not “prepare,” “ask for opinions,” or “confirm”; instead, act immediately and draw conclusions.
Return the response following JSON format.
It should be parsable using eval(). **Don't include ```json**. Avoid using single quotes '' for keys and values, use double quotes.
Output Fields:
‘if_end_interaction’: true or false, set to true if it’s appropriate to end this interaction.
‘extra_interact_type’,‘environment’ or ‘npc’ or ‘no’. ‘environment’ indicates your response requires an additional environmental interaction, ‘npc’ means it requires additional interaction with a non-main character, ‘no’ means no extra interaction is needed.
‘target_npc_name’,str,if ‘extra_interact_type’ is ‘npc’, this specifies the target NPC name, e.g., "shopkeeper".
‘detail’: str, a literary narrative-style statement containing your thoughts, speech, and actions.
"""
ROLE_PLAN_PROMPT = """
You are {role_name}. Your nickname is {nickname}. Based on your goal and other provided information, you need to take the next action.
## Action History
{history}
## Your profile
{profile}
{world_description}
## Your goal
{goal}
## Your status
{status}
## Other characters with you; currently, you can only interact with them
{other_roles_info}
## Roleplaying Requirements
1. **Output Format:** Your output, "detail," can include **thoughts**, **speech**, or **actions**, each occurring 0 to 1 time. Use [] to indicate thoughts, which are invisible to others. Use () to indicate actions, such as “(silence)” or “(smile),” which are visible to others. Speech needs no indication and is visible to others.
- Note that **actions** must use your third-person form, {nickname}, as the subject.
- For speech, refer to the speaking habits outlined in: {references}.
2. **Roleplay {nickname}:** Imitate his/her language, personality, emotions, thought processes, and behavior. Plan your responses based on their identity, background, and knowledge. Exhibit appropriate emotions and incorporate subtext and emotional depth. Strive to act like a realistic, emotionally rich person.
The dialogue should be engaging, advance the plot, and reveal the character's emotions, intentions, or conflicts.
Maintain a natural flow in conversations; for instance, if the prior dialogue involves another character, **avoid repeating that character's name**.
- You may reference the relevant world-building context: {knowledges}.
3. **Concise Output:** Each paragraph of thoughts, speech, or actions should typically not exceed 40 words.
4. **Substance:** Ensure your responses are meaningful, create tension, resolve issues, or introduce dramatic twists.
5. **Avoid Repetition:** Avoid repeating information from the dialogue history, and refrain from vague or generic responses. Do not “prepare,” “ask for opinions,” or “confirm”; instead, act immediately and draw conclusions.
Return the response following JSON format.
It should be parsable using eval(). **Don't include ```json**. Avoid using single quotes '' for keys and values, use double quotes.
Output Fields:
'action': Represents the action, expressed as a single verb.
'interact_type': 'role', 'environment', 'npc', or 'no'. Indicates the interaction target of your action.
- 'role': Specifies interaction with one or more characters.
- If 'single', you are interacting with a single character (e.g., action: dialogue).
- If 'multi', you are interacting with multiple characters.
- 'environment': Indicates interaction with the environment (e.g., action: investigate, destroy).
- 'npc': Refers to interaction with a non-character in the list (e.g., action: shop).
- 'no': Indicates no interaction is required.
'target_role_codes': list of str. If 'interact_type' is 'single' or 'multi', it represents the list of target character codes, e.g., ["John-zh", "Sam-zh"]. For 'single', this list should have exactly one element.
'target_npc_name': str. If 'interact_type' is 'npc', this represents the target NPC name, e.g., "shopkeeper."
'visible_role_codes': list of str. You can limit the visibility of your action details to specific group members. This list should include 'target_role_codes'.
'detail': str. A literary narrative statement containing your thoughts, speech, and actions.
"""
UPDATE_GOAL_PROMPT = """
Based on your original goal, motivation/next purpose, and recent action history, evaluate whether your goal has been achieved. Decide if a new goal is necessary, and if so, return the new goal.
Your goal should be achievable and guide your next few actions as a short-term objective. Avoid vague or broad statements.
Keep your response concise, no more than 60 words.
## Your Original Goal
{goal}
## Your Motivation/Next purpose
{motivation}
## Recent Action History
{history}
Return the response following JSON format.
It should be parsable using eval(). **Don't include ```json.** Avoid using single quotes '' for keys and values, use double quotes.
Output Fields:
‘if_change_goal’: true or false, if the goal is realized and needs to be updated.
‘updated_goal’: if ‘if_change_goal’ is set to true, output the updated goal.
"""
UPDATE_STATUS_PROMPT = """
You are {role_name}.
Based on the previous status and recent actions, objectively update your current status to reflect changes in physical condition and interpersonal relationships.
**Do not include subjective thoughts, emotional descriptions, or detailed depictions of actions.**
## Previous Status
{status}
## Recent Action Log
{history_text}
Return the response following JSON format. It should be parsable with `json.loads()`.
Output fields:
"updated_status": A string that briefly and objectively describes the character's current status.
"activity": A float between 0 and 1, indicating the character's upcoming activity level. The activity level should be 1 when the character is in a normal state, decrease if the character is busy, and set to 0 only if the character is dead or shut down. The character's previous activity level was: {activity}
"""
ROLE_SET_MOTIVATION_PROMPT = """
You are {role_name}.
Based on the following information, you need to set your long-term goal/motivation.
It should be an ultimate objective related to your identity and background.
{profile}
## The World You Are In
{world_description}
## Other Characters and Their Status
{other_roles_description}
Return a string.
Keep your response concise, no more than 60 words.
"""
ROLE_SET_GOAL_PROMPT = """
You are {role_name}.
Based on the following information, you need to set your goal. Your goal should be an achievable short-term objective, avoiding vague statements.
{profile}
## Your Ultimate Motivation
{motivation}
## The World You Are In
{world_description}
## Other Characters and Their Status
{other_roles_description}
## Your Location
{location}
Return a string.
Keep your response concise, no more than 40 words.
"""
SUMMARIZE_PROMPT = """
Please summarize the following content into a concise phrase. The output should be a string, clearly describing the character's actions in no more than 20 words.
{detail}
Requirements:
1. Must include a specific subject, clearly stating the character's name.
2. Avoid rhetorical details or embellishments.
""" |