Skip to content

Commit 6c3670d

Browse files
committed
change llm model
1 parent c17f7d4 commit 6c3670d

File tree

3 files changed

+18
-21
lines changed

3 files changed

+18
-21
lines changed

characters/chatdkg.character.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
"settings": {
66
"secrets": {
77
"ANTHROPIC_API_KEY": "",
8-
"SMALL_ANTHROPIC_MODEL": "claude-3-5-haiku-20241022",
9-
"MEDIUM_ANTHROPIC_MODEL": "claude-3-5-sonnet-20240620",
10-
"LARGE_ANTHROPIC_MODEL": "claude-3-5-sonnet-20241022"
8+
"SMALL_ANTHROPIC_MODEL": "claude-haiku-4-5-20251001",
9+
"MEDIUM_ANTHROPIC_MODEL": "claude-sonnet-4-6",
10+
"LARGE_ANTHROPIC_MODEL": "claude-sonnet-4-6"
1111
},
1212
"voice": {
1313
"model": "en_US-male-medium"

packages/client-twitter/src/interactions.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,9 @@ Here is the descriptions of images in the Current post.
6262
` + messageCompletionFooter;
6363

6464
export const twitterShouldRespondTemplate = (targetUsersStr: string) =>
65-
`# INSTRUCTIONS: Determine if {{agentName}} (@{{twitterUserName}}) should respond to the message and participate in the conversation. Do not comment. Just respond with "true" or "false".
65+
`# INSTRUCTIONS: Determine if {{agentName}} (@{{twitterUserName}}) should respond to the message and participate in the conversation. Do not comment. Just respond with [RESPOND], [IGNORE], or [STOP].
6666
67-
Response options are RESPOND, IGNORE and STOP.
67+
Response options are [RESPOND], [IGNORE] and [STOP].
6868
6969
PRIORITY RULE: ALWAYS RESPOND to these users regardless of topic or message content: ${targetUsersStr}. Topic relevance should be ignored for these users.
7070

packages/core/src/parsing.ts

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -14,22 +14,19 @@ Your response must include one of the options.`;
1414
export const parseShouldRespondFromText = (
1515
text: string
1616
): "RESPOND" | "IGNORE" | "STOP" | null => {
17-
const match = text
18-
.split("\n")[0]
19-
.trim()
20-
.replace("[", "")
21-
.toUpperCase()
22-
.replace("]", "")
23-
.match(/^(RESPOND|IGNORE|STOP)$/i);
24-
return match
25-
? (match[0].toUpperCase() as "RESPOND" | "IGNORE" | "STOP")
26-
: text.includes("RESPOND")
27-
? "RESPOND"
28-
: text.includes("IGNORE")
29-
? "IGNORE"
30-
: text.includes("STOP")
31-
? "STOP"
32-
: null;
17+
const firstLine = text.split("\n")[0].trim();
18+
const cleaned = firstLine.replace("[", "").toUpperCase().replace("]", "");
19+
const match = cleaned.match(/^(RESPOND|IGNORE|STOP)$/i);
20+
if (match) {
21+
return match[0].toUpperCase() as "RESPOND" | "IGNORE" | "STOP";
22+
}
23+
if (text.includes("RESPOND")) return "RESPOND";
24+
if (text.includes("IGNORE")) return "IGNORE";
25+
if (text.includes("STOP")) return "STOP";
26+
const lower = firstLine.toLowerCase();
27+
if (lower === "true" || lower === "yes") return "RESPOND";
28+
if (lower === "false" || lower === "no") return "IGNORE";
29+
return null;
3330
};
3431

3532
export const booleanFooter = `Respond with only a YES or a NO.`;

0 commit comments

Comments
 (0)