eliza icon indicating copy to clipboard operation
eliza copied to clipboard

feat: add plugin to retrieve Twitter/X sporting trends

Open salmanpot opened this issue 1 year ago • 2 comments

i have created the feature in which we extract the tweets from the twitter globally from the twitter Api and by using these trends and the dumy data that we have created to test both concat and give to our LLM model in which LLM model give the response according to the character file that we made.

salmanpot avatar Dec 10 '24 12:12 salmanpot

1- The decision to empty agent/.gitignore was made because when attempting to push the code to GitHub, .ts files were being included, which caused conflicts and prevented the latest code from being pushed successfully. A main .gitignore file has already been created at the root level, which contains all the necessary exclusions, including those for .ts files. This eliminates the need for a separate .gitignore file in the agent/ folder.

2- I have corrected the hardcoded path issue by replacing it with a relative path using __dirname for better portability and maintainability.

3-I understand the concern about deleting sample characters. To test our sports analysis functionality, I temporarily replaced the sample character file but have since reverted it back. Rest assured, I have all the original sample files, including the personality you provided and the ones we tested.

On Tue, 10 Dec 2024 at 12:00, Odilitime @.***> wrote:

@.**** requested changes on this pull request.

On agent/.gitignore https://github.com/ai16z/eliza/pull/971#discussion_r1878363005:

Revert or explain why this is necessary

In agent/src/services/twitter/services.ts https://github.com/ai16z/eliza/pull/971#discussion_r1878369796:

+// Load environment variables from .env file +dotenv.config();

+// Define constants +const BEARER_TOKEN = process.env.BEARER_TOKEN; +const BASE_URL = "https://api.twitter.com/2/tweets/search/recent"; + +/**

    • Fetch recent tweets related to sports.
    • @param maxResults Number of tweets to fetch (default: 10)
  • */

+// this function will get data from documnets for buliding custom knowledge base +export const fetchDocuments = async (): Promise<string[]> => {

  • const pdfService = new PdfService();
  • const pdfFilePath = "C:/Users/Dell/eliza-1/agent/src/services/twitter/game.pdf"; //a dummy pdf

no hard coded paths, node has __dirname if you want to give a relative path to this file https://nodejs.org/docs/latest/api/globals.html#__dirname

On characters/trump.character.json https://github.com/ai16z/eliza/pull/971#discussion_r1878371462:

I'm not sure we should be deleting our sample characters without replacing them

— Reply to this email directly, view it on GitHub https://github.com/ai16z/eliza/pull/971#pullrequestreview-2492783366, or unsubscribe https://github.com/notifications/unsubscribe-auth/A25IBTDKIAJAXDO3DUXL2E32E4FYHAVCNFSM6AAAAABTLDQIYOVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDIOJSG44DGMZWGY . You are receiving this because you authored the thread.Message ID: @.***>

salmanpot avatar Dec 11 '24 11:12 salmanpot

  1. That makes sense for the .ts changes what about the data/ and generatedImages/

  2. Will check it out when you push the code for that

  3. Will check it out when you push the code for that

odilitime avatar Dec 11 '24 15:12 odilitime

As we are refactoring, I'm gonna close this since it is a lot of unintended consequences and changes

lalalune avatar Dec 14 '24 11:12 lalalune