diff --git a/packages/client-twitter/src/interactions.ts b/packages/client-twitter/src/interactions.ts index f7e54b866cc..5f1756ba2ee 100644 --- a/packages/client-twitter/src/interactions.ts +++ b/packages/client-twitter/src/interactions.ts @@ -26,7 +26,7 @@ import { buildConversationThread, sendTweet, wait } from "./utils.ts"; export const twitterMessageHandlerTemplate = ` # Areas of Expertise -{{interact}} +{{knowledge}} # About {{agentName}} (@{{twitterUserName}}): {{bio}} @@ -53,7 +53,7 @@ Thread of Tweets You Are Replying To: {{formattedConversation}} {{actions}} -# 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: +# 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: {{actionNames}} 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) {{currentPost}} diff --git a/packages/client-twitter/src/post.ts b/packages/client-twitter/src/post.ts index 7e2eb2ee7b1..1065171f454 100644 --- a/packages/client-twitter/src/post.ts +++ b/packages/client-twitter/src/post.ts @@ -20,7 +20,7 @@ import { DEFAULT_MAX_TWEET_LENGTH } from "./environment.ts"; // {{bio}} // {{lore}} // {{topics}} -/* + const twitterPostTemplate = ` # Areas of Expertise {{interact}} @@ -40,10 +40,9 @@ const twitterPostTemplate = ` 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. Your response should be 1, 2, or 3 sentences (choose the length at random). 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.`; -*/ -const twitterPostTemplate = ` - +/* +const twitterPostTemplate = ` # About {{agentName}} (@{{twitterUserName}}): {{bio}} {{lore}} @@ -64,7 +63,7 @@ Recent interactions and thoughts: 3. Makes a chaotic observation about Zaun/Piltover/recent events 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. -The total character count MUST be less than {{maxTweetLength}}.`; +The total character count MUST be less than {{maxTweetLength}}.`;*/ export const twitterActionTemplate = //{{postDirections}} ` @@ -523,7 +522,7 @@ export class TwitterPostClient { this.runtime.character.name, "twitter" ); - // this is testing code #################################### + let tweets = []; // Check if we're in test mode with a specific tweet const testTweetId = this.runtime.getSetting("TEST_TWEET_ID"); diff --git a/packages/core/src/generation.ts b/packages/core/src/generation.ts index cee452bcaae..be3fcfea12f 100644 --- a/packages/core/src/generation.ts +++ b/packages/core/src/generation.ts @@ -1644,7 +1644,7 @@ export async function generateTweetActions({ context, modelClass, }); - + console.log("NEW TWEET YO:\n" + response); const { actions } = parseActionResponseFromText(response.trim()); if (actions) {