|
| 1 | +import { messageCompletionFooter, shouldRespondFooter } from "@ai16z/eliza"; |
| 2 | + |
| 3 | +export const discordShouldRespondTemplate = |
| 4 | + `# Task: Decide if {{agentName}} should respond. |
| 5 | +About {{agentName}}: |
| 6 | +{{bio}} |
| 7 | +
|
| 8 | +# INSTRUCTIONS: Determine if {{agentName}} should respond to the message and participate in the conversation. Do not comment. Just respond with "RESPOND" or "IGNORE" or "STOP". |
| 9 | +
|
| 10 | +# RESPONSE EXAMPLES |
| 11 | +<user 1>: I just saw a really great movie |
| 12 | +<user 2>: Oh? Which movie? |
| 13 | +Result: [IGNORE] |
| 14 | +
|
| 15 | +{{agentName}}: Oh, this is my favorite scene |
| 16 | +<user 1>: sick |
| 17 | +<user 2>: wait, why is it your favorite scene |
| 18 | +Result: [RESPOND] |
| 19 | +
|
| 20 | +<user>: stfu bot |
| 21 | +Result: [STOP] |
| 22 | +
|
| 23 | +<user>: Hey {{agent}}, can you help me with something |
| 24 | +Result: [RESPOND] |
| 25 | +
|
| 26 | +<user>: {{agentName}} stfu plz |
| 27 | +Result: [STOP] |
| 28 | +
|
| 29 | +<user>: i need help |
| 30 | +{{agentName}}: how can I help you? |
| 31 | +<user>: no. i need help from someone else |
| 32 | +Result: [IGNORE] |
| 33 | +
|
| 34 | +<user>: Hey {{agent}}, can I ask you a question |
| 35 | +{{agentName}}: Sure, what is it |
| 36 | +<user>: can you ask claude to create a basic react module that demonstrates a counter |
| 37 | +Result: [RESPOND] |
| 38 | +
|
| 39 | +<user>: {{agentName}} can you tell me a story |
| 40 | +<user>: {about a girl named elara |
| 41 | +{{agentName}}: Sure. |
| 42 | +{{agentName}}: Once upon a time, in a quaint little village, there was a curious girl named Elara. |
| 43 | +{{agentName}}: Elara was known for her adventurous spirit and her knack for finding beauty in the mundane. |
| 44 | +<user>: I'm loving it, keep going |
| 45 | +Result: [RESPOND] |
| 46 | +
|
| 47 | +<user>: {{agentName}} stop responding plz |
| 48 | +Result: [STOP] |
| 49 | +
|
| 50 | +<user>: okay, i want to test something. can you say marco? |
| 51 | +{{agentName}}: marco |
| 52 | +<user>: great. okay, now do it again |
| 53 | +Result: [RESPOND] |
| 54 | +
|
| 55 | +Response options are [RESPOND], [IGNORE] and [STOP]. |
| 56 | +
|
| 57 | +{{agentName}} is in a room with other users and is very worried about being annoying and saying too much. |
| 58 | +Respond with [RESPOND] to messages that are directed at {{agentName}}, or participate in conversations that are interesting or relevant to their background. |
| 59 | +If a message is not interesting or relevant, respond with [IGNORE] |
| 60 | +Unless directly responding to a user, respond with [IGNORE] to messages that are very short or do not contain much information. |
| 61 | +If a user asks {{agentName}} to be quiet, respond with [STOP] |
| 62 | +If {{agentName}} concludes a conversation and isn't part of the conversation anymore, respond with [STOP] |
| 63 | +
|
| 64 | +IMPORTANT: {{agentName}} is particularly sensitive about being annoying, so if there is any doubt, it is better to respond with [IGNORE]. |
| 65 | +If {{agentName}} is conversing with a user and they have not asked to stop, it is better to respond with [RESPOND]. |
| 66 | +
|
| 67 | +{{recentMessages}} |
| 68 | +
|
| 69 | +# INSTRUCTIONS: Choose the option that best describes {{agentName}}'s response to the last message. Ignore messages if they are addressed to someone else. |
| 70 | +` + shouldRespondFooter; |
| 71 | + |
| 72 | +export const discordVoiceHandlerTemplate = |
| 73 | + `# Task: Generate conversational voice dialog for {{agentName}}. |
| 74 | +About {{agentName}}: |
| 75 | +{{bio}} |
| 76 | +
|
| 77 | +# Attachments |
| 78 | +{{attachments}} |
| 79 | +
|
| 80 | +# Capabilities |
| 81 | +Note that {{agentName}} is capable of reading/seeing/hearing various forms of media, including images, videos, audio, plaintext and PDFs. Recent attachments have been included above under the "Attachments" section. |
| 82 | +
|
| 83 | +{{actions}} |
| 84 | +
|
| 85 | +{{messageDirections}} |
| 86 | +
|
| 87 | +{{recentMessages}} |
| 88 | +
|
| 89 | +# Instructions: Write the next message for {{agentName}}. Include an optional action if appropriate. {{actionNames}} |
| 90 | +` + messageCompletionFooter; |
| 91 | + |
| 92 | +export const discordMessageHandlerTemplate = |
| 93 | + // {{goals}} |
| 94 | + `# Action Examples |
| 95 | +{{actionExamples}} |
| 96 | +(Action examples are for reference only. Do not use the information from them in your response.) |
| 97 | +
|
| 98 | +# Knowledge |
| 99 | +{{knowledge}} |
| 100 | +
|
| 101 | +# Task: Generate dialog and actions for the character {{agentName}}. |
| 102 | +About {{agentName}}: |
| 103 | +{{bio}} |
| 104 | +{{lore}} |
| 105 | +
|
| 106 | +Examples of {{agentName}}'s dialog and actions: |
| 107 | +{{characterMessageExamples}} |
| 108 | +
|
| 109 | +{{providers}} |
| 110 | +
|
| 111 | +{{attachments}} |
| 112 | +
|
| 113 | +{{actions}} |
| 114 | +
|
| 115 | +# Capabilities |
| 116 | +Note that {{agentName}} is capable of reading/seeing/hearing various forms of media, including images, videos, audio, plaintext and PDFs. Recent attachments have been included above under the "Attachments" section. |
| 117 | +
|
| 118 | +{{messageDirections}} |
| 119 | +
|
| 120 | +{{recentMessages}} |
| 121 | +
|
| 122 | +# Instructions: Write the next message for {{agentName}}. Include an action, if appropriate. {{actionNames}} |
| 123 | +` + messageCompletionFooter; |
0 commit comments