Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: twitter client enhancements #913

Merged
merged 5 commits into from
Dec 12, 2024

Conversation

tharak123455
Copy link
Contributor

Relates to:

Issue related to Twitter client enhancements and environment configuration

Risks

Low - Changes to Twitter target users configuration and environment example file. No core functionality changes.

Background

What does this PR do?

Adds dynamic Twitter target users configuration through environment variables(agent can interact with these user tweets even if it is not mentioned)
Updates .env.example with Twitter-related configuration examples
Improves error handling for wallet providers in Twitter client
Enhances Twitter interaction handling

What kind of change is this?

Improvements (misc. changes to existing features)

Documentation changes needed?

My changes require a change to the project documentation.
Updated .env.example with new Twitter configuration options
Documentation for Twitter target users configuration

Testing

Where should a reviewer start?

Check the updated .env.example file for new Twitter configurations
Review changes in packages/client-twitter/src/interactions.ts

Detailed testing steps

Copy .env.example to .env
Configure TWITTER_TARGET_USERS with comma-separated usernames
Run the Twitter client
Bot responds to configured target users
Error handling works for wallet provider issues
Twitter interactions are properly processed

Deploy Notes

New environment variable TWITTER_TARGET_USERS needs to be configured if using custom target users

Database changes

no database changes needed

Discord username

tharakesh5545

@tharak123455
Copy link
Contributor Author

Requesting review of changes implemented as per @cygaar feedback:

Changes Implemented

  1. Removed default target users array
  2. Added validation for TWITTER_TARGET_USERS configuration
  3. Improved error handling in handleTweet method
  4. Added proper string sanitization for JSON parsing
  5. Updated logging messages for better clarity

Key Updates

  • Made target users feature completely optional
  • Added robust validation for empty/invalid configurations
  • Improved error handling for JSON parsing
  • Enhanced logging for debugging purposes

@odilitime odilitime changed the base branch from main to develop December 12, 2024 08:21
@odilitime odilitime merged commit 2fcca62 into elizaOS:develop Dec 12, 2024
1 of 2 checks passed
@odilitime odilitime changed the title Twitter client enhancements feat: twitter client enhancements Dec 13, 2024
@hcaumo
Copy link

hcaumo commented Dec 22, 2024

Is it working? Because my agent is interacting with everyone from my twitter timeline. Do It need the xAPI? or something like this to work?

or at least see only my followers timeline?

@tharak123455
Copy link
Contributor Author

Is it working? Because my agent is interacting with everyone from my twitter timeline. Do It need the xAPI? or something like this to work?

or at least see only my followers timeline?

It works,if you give usernames in twitter_target_users in .env

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants