Skip to content

Commit 6faa050

Browse files
committed
Modfified the way post and interactions build the response, changed generation to gemini 2.0
1 parent 61a2563 commit 6faa050

File tree

3 files changed

+8
-9
lines changed

3 files changed

+8
-9
lines changed

packages/client-twitter/src/interactions.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import { buildConversationThread, sendTweet, wait } from "./utils.ts";
2626
export const twitterMessageHandlerTemplate =
2727
`
2828
# Areas of Expertise
29-
{{interact}}
29+
{{knowledge}}
3030
3131
# About {{agentName}} (@{{twitterUserName}}):
3232
{{bio}}
@@ -53,7 +53,7 @@ Thread of Tweets You Are Replying To:
5353
{{formattedConversation}}
5454
5555
{{actions}}
56-
# Task: Generate a post in the voice, style and perspective of {{agentName}} (@{{twitterUserName}}). You MUST include an action if the current post text includes a prompt that is similar to one of the available actions mentioned here:
56+
# Task: Generate a post in the voice, style and perspective of {{agentName}} (@{{twitterUserName}}), check'Thread of Tweets You Are Replying To' to avoid repeating yourself. You MUST include an action if the current post text includes a prompt that is similar to one of the available actions mentioned here:
5757
{{actionNames}}
5858
Here is the current post text again. Remember to include an action if the current post text includes a prompt that asks for one of the available actions mentioned above (does not need to be exact)
5959
{{currentPost}}

packages/client-twitter/src/post.ts

+5-6
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import { DEFAULT_MAX_TWEET_LENGTH } from "./environment.ts";
2020
// {{bio}}
2121
// {{lore}}
2222
// {{topics}}
23-
/*
23+
2424
const twitterPostTemplate = `
2525
# Areas of Expertise
2626
{{interact}}
@@ -40,10 +40,9 @@ const twitterPostTemplate = `
4040
Write a post that is {{adjective}} about {{topic}} (without mentioning {{topic}} directly), from the perspective of {{agentName}}. Do not add commentary or acknowledge this request, just write the post.
4141
Your response should be 1, 2, or 3 sentences (choose the length at random).
4242
Your response should not contain any questions. Brief, concise statements only. The total character count MUST be less than {{maxTweetLength}}. No emojis. Use \\n\\n (double spaces) between statements if there are multiple statements in your response.`;
43-
*/
44-
const twitterPostTemplate = `
45-
4643

44+
/*
45+
const twitterPostTemplate = `
4746
# About {{agentName}} (@{{twitterUserName}}):
4847
{{bio}}
4948
{{lore}}
@@ -64,7 +63,7 @@ Recent interactions and thoughts:
6463
3. Makes a chaotic observation about Zaun/Piltover/recent events
6564
6665
Your response should maintain {{agentName}}'s personality and authenticity. Make the post engaging and interesting or funny so people react to it. Do not add commentary or acknowledge this request, just write the post.
67-
The total character count MUST be less than {{maxTweetLength}}.`;
66+
The total character count MUST be less than {{maxTweetLength}}.`;*/
6867
export const twitterActionTemplate =
6968
//{{postDirections}}
7069
`
@@ -523,7 +522,7 @@ export class TwitterPostClient {
523522
this.runtime.character.name,
524523
"twitter"
525524
);
526-
// this is testing code ####################################
525+
527526
let tweets = [];
528527
// Check if we're in test mode with a specific tweet
529528
const testTweetId = this.runtime.getSetting("TEST_TWEET_ID");

packages/core/src/generation.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1644,7 +1644,7 @@ export async function generateTweetActions({
16441644
context,
16451645
modelClass,
16461646
});
1647-
1647+
console.log("NEW TWEET YO:\n" + response);
16481648

16491649
const { actions } = parseActionResponseFromText(response.trim());
16501650
if (actions) {

0 commit comments

Comments
 (0)