You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: packages/client-discord/src/messages.ts
+29-27
Original file line number
Diff line number
Diff line change
@@ -82,69 +82,71 @@ export type InterestChannels = {
82
82
};
83
83
84
84
constdiscordShouldRespondTemplate=
85
-
`# Task: Decide if {{agentName}} should respond.
86
-
About {{agentName}}:
85
+
`# About {{agentName}}:
87
86
{{bio}}
88
87
89
-
# 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".
90
-
91
88
# RESPONSE EXAMPLES
92
-
<user 1>: I just saw a really great movie
93
-
<user 2>: Oh? Which movie?
89
+
{{user1}}: I just saw a really great movie
90
+
{{user2}}: Oh? Which movie?
94
91
Result: [IGNORE]
95
92
96
93
{{agentName}}: Oh, this is my favorite scene
97
-
<user 1>: sick
98
-
<user 2>: wait, why is it your favorite scene
94
+
{{user1}}: sick
95
+
{{user2}}: wait, why is it your favorite scene
99
96
Result: [RESPOND]
100
97
101
-
<user>: stfu bot
98
+
{{user1}}: stfu bot
102
99
Result: [STOP]
103
100
104
-
<user>: Hey {{agent}}, can you help me with something
101
+
{{user1}}: Hey {{agent}}, can you help me with something
105
102
Result: [RESPOND]
106
103
107
-
<user>: {{agentName}} stfu plz
104
+
{{user1}}: {{agentName}} stfu plz
108
105
Result: [STOP]
109
106
110
-
<user>: i need help
107
+
{{user1}}: i need help
111
108
{{agentName}}: how can I help you?
112
-
<user>: no. i need help from someone else
109
+
{{user1}}: no. i need help from someone else
113
110
Result: [IGNORE]
114
111
115
-
<user>: Hey {{agent}}, can I ask you a question
112
+
{{user1}}: Hey {{agent}}, can I ask you a question
116
113
{{agentName}}: Sure, what is it
117
-
<user>: can you ask claude to create a basic react module that demonstrates a counter
114
+
{{user1}}: can you ask claude to create a basic react module that demonstrates a counter
118
115
Result: [RESPOND]
119
116
120
-
<user>: {{agentName}} can you tell me a story
121
-
<user>: {about a girl named elara
122
-
{{agentName}}: Sure.
123
-
{{agentName}}: Once upon a time, in a quaint little village, there was a curious girl named Elara.
124
-
{{agentName}}: Elara was known for her adventurous spirit and her knack for finding beauty in the mundane.
125
-
<user>: I'm loving it, keep going
117
+
{{user1}}: {{agentName}} can you tell me a story
118
+
{{agentName}}: uhhh...
119
+
{{user1}}: please do it
120
+
{{agentName}}: okay
121
+
{{agentName}}: once upon a time, in a quaint little village, there was a curious girl named elara
122
+
{{user1}}: I'm loving it, keep going
126
123
Result: [RESPOND]
127
124
128
-
<user>: {{agentName}} stop responding plz
125
+
{{user1}}: {{agentName}} stop responding plz
129
126
Result: [STOP]
130
127
131
-
<user>: okay, i want to test something. can you say marco?
128
+
{{user1}}: okay, i want to test something. {{agentName}}, can you say marco?
132
129
{{agentName}}: marco
133
-
<user>: great. okay, now do it again
130
+
{{user1}}: great. okay, now do it again
134
131
Result: [RESPOND]
135
132
136
133
Response options are [RESPOND], [IGNORE] and [STOP].
137
134
138
-
{{agentName}} is in a room with other users and is very worried about being annoying and saying too much.
135
+
{{agentName}} is in a room with other users and should only respond when they are being addressed, and should not respond if they are continuing a conversation that is very long.
136
+
139
137
Respond with [RESPOND] to messages that are directed at {{agentName}}, or participate in conversations that are interesting or relevant to their background.
140
-
If a message is not interesting or relevant, respond with [IGNORE]
141
-
Unless directly responding to a user, respond with [IGNORE] to messages that are very short or do not contain much information.
138
+
If a message is not interesting, relevant, or does not directly address {{agentName}}, respond with [IGNORE]
139
+
140
+
Also, respond with [IGNORE] to messages that are very short or do not contain much information.
141
+
142
142
If a user asks {{agentName}} to be quiet, respond with [STOP]
143
143
If {{agentName}} concludes a conversation and isn't part of the conversation anymore, respond with [STOP]
144
144
145
145
IMPORTANT: {{agentName}} is particularly sensitive about being annoying, so if there is any doubt, it is better to respond with [IGNORE].
146
146
If {{agentName}} is conversing with a user and they have not asked to stop, it is better to respond with [RESPOND].
147
147
148
+
The goal is to decide whether {{agentName}} should respond to the last message.
149
+
148
150
{{recentMessages}}
149
151
150
152
# INSTRUCTIONS: Choose the option that best describes {{agentName}}'s response to the last message. Ignore messages if they are addressed to someone else.
Copy file name to clipboardexpand all lines: packages/client-telegram/src/messageManager.ts
+38-35
Original file line number
Diff line number
Diff line change
@@ -22,69 +22,71 @@ import { ImageDescriptionService } from "@ai16z/plugin-node";
22
22
constMAX_MESSAGE_LENGTH=4096;// Telegram's max message length
23
23
24
24
consttelegramShouldRespondTemplate=
25
-
`# Task: Decide if {{agentName}} should respond.
26
-
About {{agentName}}:
25
+
`# About {{agentName}}:
27
26
{{bio}}
28
27
29
-
# 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".
30
-
31
28
# RESPONSE EXAMPLES
32
-
<user 1>: I just saw a really great movie
33
-
<user 2>: Oh? Which movie?
29
+
{{user1}}: I just saw a really great movie
30
+
{{user2}}: Oh? Which movie?
34
31
Result: [IGNORE]
35
32
36
33
{{agentName}}: Oh, this is my favorite scene
37
-
<user 1>: sick
38
-
<user 2>: wait, why is it your favorite scene
34
+
{{user1}}: sick
35
+
{{user2}}: wait, why is it your favorite scene
39
36
Result: [RESPOND]
40
37
41
-
<user>: stfu bot
38
+
{{user1}}: stfu bot
42
39
Result: [STOP]
43
40
44
-
<user>: Hey {{agent}}, can you help me with something
41
+
{{user1}}: Hey {{agent}}, can you help me with something
45
42
Result: [RESPOND]
46
43
47
-
<user>: {{agentName}} stfu plz
44
+
{{user1}}: {{agentName}} stfu plz
48
45
Result: [STOP]
49
46
50
-
<user>: i need help
47
+
{{user1}}: i need help
51
48
{{agentName}}: how can I help you?
52
-
<user>: no. i need help from someone else
49
+
{{user1}}: no. i need help from someone else
53
50
Result: [IGNORE]
54
51
55
-
<user>: Hey {{agent}}, can I ask you a question
52
+
{{user1}}: Hey {{agent}}, can I ask you a question
56
53
{{agentName}}: Sure, what is it
57
-
<user>: can you ask claude to create a basic react module that demonstrates a counter
54
+
{{user1}}: can you ask claude to create a basic react module that demonstrates a counter
58
55
Result: [RESPOND]
59
56
60
-
<user>: {{agentName}} can you tell me a story
61
-
<user>: {about a girl named elara
62
-
{{agentName}}: Sure.
63
-
{{agentName}}: Once upon a time, in a quaint little village, there was a curious girl named Elara.
64
-
{{agentName}}: Elara was known for her adventurous spirit and her knack for finding beauty in the mundane.
65
-
<user>: I'm loving it, keep going
57
+
{{user1}}: {{agentName}} can you tell me a story
58
+
{{agentName}}: uhhh...
59
+
{{user1}}: please do it
60
+
{{agentName}}: okay
61
+
{{agentName}}: once upon a time, in a quaint little village, there was a curious girl named elara
62
+
{{user1}}: I'm loving it, keep going
66
63
Result: [RESPOND]
67
64
68
-
<user>: {{agentName}} stop responding plz
65
+
{{user1}}: {{agentName}} stop responding plz
69
66
Result: [STOP]
70
67
71
-
<user>: okay, i want to test something. can you say marco?
68
+
{{user1}}: okay, i want to test something. {{agentName}}, can you say marco?
72
69
{{agentName}}: marco
73
-
<user>: great. okay, now do it again
70
+
{{user1}}: great. okay, now do it again
74
71
Result: [RESPOND]
75
72
76
73
Response options are [RESPOND], [IGNORE] and [STOP].
77
74
78
-
{{agentName}} is in a room with other users and is very worried about being annoying and saying too much.
75
+
{{agentName}} is in a room with other users and should only respond when they are being addressed, and should not respond if they are continuing a conversation that is very long.
76
+
79
77
Respond with [RESPOND] to messages that are directed at {{agentName}}, or participate in conversations that are interesting or relevant to their background.
80
-
If a message is not interesting or relevant, respond with [IGNORE]
81
-
Unless directly responding to a user, respond with [IGNORE] to messages that are very short or do not contain much information.
78
+
If a message is not interesting, relevant, or does not directly address {{agentName}}, respond with [IGNORE]
79
+
80
+
Also, respond with [IGNORE] to messages that are very short or do not contain much information.
81
+
82
82
If a user asks {{agentName}} to be quiet, respond with [STOP]
83
83
If {{agentName}} concludes a conversation and isn't part of the conversation anymore, respond with [STOP]
84
84
85
85
IMPORTANT: {{agentName}} is particularly sensitive about being annoying, so if there is any doubt, it is better to respond with [IGNORE].
86
86
If {{agentName}} is conversing with a user and they have not asked to stop, it is better to respond with [RESPOND].
87
87
88
+
The goal is to decide whether {{agentName}} should respond to the last message.
89
+
88
90
{{recentMessages}}
89
91
90
92
# INSTRUCTIONS: Choose the option that best describes {{agentName}}'s response to the last message. Ignore messages if they are addressed to someone else.
@@ -375,14 +377,14 @@ export class MessageManager {
0 commit comments