Skip to content

Commit 19d405e

Browse files
committed
shorten response
1 parent 09cfa0d commit 19d405e

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/clients/twitter/generate.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { Tweet } from "agent-twitter-client";
2+
23
import fs from "fs";
34
import { composeContext } from "../../core/context.ts";
45
import { log_to_file } from "../../core/logger.ts";
@@ -23,6 +24,7 @@ About {{agentName}} (@{{twitterUserName}}):
2324
{{characterPostExamples}}
2425
2526
# Task: Generate a post in the voice and style of {{agentName}}, aka @{{twitterUserName}}
27+
Aim for 1-2 short sentences maximum. Be concise and direct.
2628
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.
2729
Your response should not contain any questions. Brief, concise statements only. No emojis. Use \\n\\n (double spaces) between statements.`;
2830

@@ -32,7 +34,8 @@ export class TwitterGenerationClient extends ClientBase {
3234
this.generateNewTweet();
3335
setTimeout(
3436
generateNewTweetLoop,
35-
(Math.floor(Math.random() * (45 - 15 + 1)) + 15) * 60 * 1000,
37+
//(Math.floor(Math.random() * (45 - 15 + 1)) + 15) * 60 * 1000,
38+
(Math.floor(Math.random() * (20 - 2 + 1)) + 2) * 60 * 1000
3639
); // Random interval between 4-8 hours
3740
};
3841
// setTimeout(() => {

src/clients/twitter/utils.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { ClientBase } from "./base.ts";
55
import { embeddingZeroVector } from "../../core/memory.ts";
66
import { stringToUuid } from "../../core/uuid.ts";
77

8-
const MAX_TWEET_LENGTH = 280;
8+
const MAX_TWEET_LENGTH = 240;
99

1010
export const wait = (minTime: number = 1000, maxTime: number = 3000) => {
1111
const waitTime =

0 commit comments

Comments
 (0)