From 6af5cf1447f1d8e129b04b4d9c5bc423e2f9b2c4 Mon Sep 17 00:00:00 2001 From: bigsky77 Date: Fri, 1 Nov 2024 09:12:38 +0100 Subject: [PATCH 1/3] add darkMaga character --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index bf2ef77e4d..a806ddf518 100644 --- a/package-lock.json +++ b/package-lock.json @@ -126,7 +126,7 @@ "ts-jest": "29.2.5", "ts-node": "10.9.2", "tslib": "2.8.0", - "typescript": "5.6.3", + "typescript": "^5.6.3", "wrangler": "3.75.0" }, "optionalDependencies": { diff --git a/package.json b/package.json index 10b354f26f..2202cf047f 100644 --- a/package.json +++ b/package.json @@ -62,7 +62,7 @@ "ts-jest": "29.2.5", "ts-node": "10.9.2", "tslib": "2.8.0", - "typescript": "5.6.3", + "typescript": "^5.6.3", "wrangler": "3.75.0" }, "dependencies": { From 09cfa0d7f5e9ace07efd75bfeab97ab3dbf50afc Mon Sep 17 00:00:00 2001 From: bigsky77 Date: Fri, 1 Nov 2024 09:16:02 +0100 Subject: [PATCH 2/3] shorten response --- src/clients/twitter/search.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/clients/twitter/search.ts b/src/clients/twitter/search.ts index 887f318cb6..7d30226fcb 100644 --- a/src/clients/twitter/search.ts +++ b/src/clients/twitter/search.ts @@ -43,6 +43,9 @@ About {{agentName}} (@{{twitterUserName}}): # Task: Respond to the following post in the style and perspective of {{agentName}} (aka @{{twitterUserName}}). Write a {{adjective}} response for {{agentName}} to say directly in response to the post. don't generalize. {{currentPost}} +IMPORTANT: Your response CANNOT be longer than 20 words. +Aim for 1-2 short sentences maximum. Be concise and direct. + Your response should not contain any questions. Brief, concise statements only. No emojis. Use \\n\\n (double spaces) between statements. ` + messageCompletionFooter; From 19d405e6d85e2d55bdd1890bf43551db58d01b16 Mon Sep 17 00:00:00 2001 From: bigsky77 Date: Sat, 2 Nov 2024 16:50:12 +0100 Subject: [PATCH 3/3] shorten response --- src/clients/twitter/generate.ts | 5 ++++- src/clients/twitter/utils.ts | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/clients/twitter/generate.ts b/src/clients/twitter/generate.ts index 428de5f434..191485ead2 100644 --- a/src/clients/twitter/generate.ts +++ b/src/clients/twitter/generate.ts @@ -1,4 +1,5 @@ import { Tweet } from "agent-twitter-client"; + import fs from "fs"; import { composeContext } from "../../core/context.ts"; import { log_to_file } from "../../core/logger.ts"; @@ -23,6 +24,7 @@ About {{agentName}} (@{{twitterUserName}}): {{characterPostExamples}} # Task: Generate a post in the voice and style of {{agentName}}, aka @{{twitterUserName}} +Aim for 1-2 short sentences maximum. Be concise and direct. Write a single sentence post that is {{adjective}} about {{topic}} (without mentioning {{topic}} directly), from the perspective of {{agentName}}. Try to write something totally different than previous posts. Do not add commentary or ackwowledge this request, just write the post. Your response should not contain any questions. Brief, concise statements only. No emojis. Use \\n\\n (double spaces) between statements.`; @@ -32,7 +34,8 @@ export class TwitterGenerationClient extends ClientBase { this.generateNewTweet(); setTimeout( generateNewTweetLoop, - (Math.floor(Math.random() * (45 - 15 + 1)) + 15) * 60 * 1000, + //(Math.floor(Math.random() * (45 - 15 + 1)) + 15) * 60 * 1000, + (Math.floor(Math.random() * (20 - 2 + 1)) + 2) * 60 * 1000 ); // Random interval between 4-8 hours }; // setTimeout(() => { diff --git a/src/clients/twitter/utils.ts b/src/clients/twitter/utils.ts index 58426b5b15..d4bdbf7bc8 100644 --- a/src/clients/twitter/utils.ts +++ b/src/clients/twitter/utils.ts @@ -5,7 +5,7 @@ import { ClientBase } from "./base.ts"; import { embeddingZeroVector } from "../../core/memory.ts"; import { stringToUuid } from "../../core/uuid.ts"; -const MAX_TWEET_LENGTH = 280; +const MAX_TWEET_LENGTH = 240; export const wait = (minTime: number = 1000, maxTime: number = 3000) => { const waitTime =