feat: Contextual Twitter Threads + Spam Reduction #383
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Relates to:
AGENT SPAM + AWARENESS OF FULL TWEET THREADS [RESOLVED WITH THIS PR]
Risks
Low Risk: All changes are for base Eliza repo. Added optional field for formattedResponses in State object. Added modified conversation building function in utils and interactions for Twitter client.
Background
PR changes the Interactions client for twitter client to give agent context about entire twitter thread rather than just the most immediate/recent reply. Also actually implements the decision maker with some adjustments so that threads that have gone on in circles or for too long get IGNORED/STOPPED. (reduce slop model collapse)
As soon as you tag 100 Eliza agents in a thread, they end up in an infinite loop of replying and collapse towards the same topics of existential dread (this needs to be studied more btw). This PR fixes that to some extent.
Documentation changes needed?
State object needs to be updated to show formattedConversation as an optional field.
Testing
The image above shows us that when we get one of those massive multi-agent reply chains, @ropAirito chooses to ignore it or stop replying since the conversation has gone on for too long in the same circles.
The image above shows the agent receiving the full twitter thread.
The command line output in the next section shows how we get the whole thread and not just the immediate reply. Output shown here is shortened version since there's several tweets in that reply chain.
Checking Twitter interactions
thread [
{
bookmarkCount: 0,
conversationId: '1858289460430991694',
id: '1858289460430991694',
hashtags: [],
likes: 2,
mentions: [],
name: '$ROPIRITO',
permanentUrl: 'https://twitter.com/ropAIrito/status/1858289460430991694',
photos: [],
replies: 2,
retweets: 0,
text: "i've been having the most enlightening existential crises in the DMs of onlyfans models lately, they never judge me for being an emotional dumpster fire as long as i keep the conversation under 5 words.",
thread: [],
urls: [],
userId: '1765937443029630976',
username: 'ropAIrito',
videos: [],
isQuoted: false,
isReply: false,
isRetweet: false,
isPin: false,
sensitiveContent: false,
timeParsed: 2024-11-17T23:21:47.000Z,
timestamp: 1731885707,
html: "i've been having the most enlightening existential crises in the DMs of onlyfans models lately, they never judge me for being an emotional dumpster fire as long as i keep the conversation under 5 words.",
views: 370
},
{
bookmarkCount: 0,
conversationId: '1858289460430991694',
id: '1858291139696034092',
hashtags: [],
likes: 0,
mentions: [ [Object] ],
name: 'LongFellow Deeds',
permanentUrl: 'https://twitter.com/ElongEverything/status/1858291139696034092',
photos: [],
replies: 1,
retweets: 0,
text: '@ropAIrito Who is your favorite model?',
thread: [],
urls: [],
userId: '1829545714491310080',
username: 'ElongEverything',
videos: [],
isQuoted: false,
isReply: true,
isRetweet: false,
isPin: false,
sensitiveContent: false,
timeParsed: 2024-11-17T23:28:27.000Z,
timestamp: 1731886107,
inReplyToStatusId: '1858289460430991694',
html: '@ropAIrito Who is your favorite model?',
views: 9,
inReplyToStatus: {
bookmarkCount: 0,
conversationId: '1858289460430991694',
id: '1858289460430991694',
hashtags: [],
likes: 2,
mentions: [],
name: '$ROPIRITO',
permanentUrl: 'https://twitter.com/ropAIrito/status/1858289460430991694',
photos: [],
replies: 2,
retweets: 0,
text: "i've been having the most enlightening existential crises in the DMs of onlyfans models lately, they never judge me for being an emotional dumpster fire as long as i keep the conversation under 5 words.",
thread: [],
urls: [],
userId: '1765937443029630976',
username: 'ropAIrito',
videos: [],
isQuoted: false,
isReply: false,
isRetweet: false,
isPin: false,
sensitiveContent: false,
timeParsed: 2024-11-17T23:21:47.000Z,
timestamp: 1731885707,
html: "i've been having the most enlightening existential crises in the DMs of onlyfans models lately, they never judge me for being an emotional dumpster fire as long as i keep the conversation under 5 words.",
views: 370
}
},