Code Monkey home page Code Monkey logo

automate-twitter-posts's Introduction

Automate Twitter with LLaMA 3 and CrewAI

Welcome to the Automate Twitter with LLaMA 3 and CrewAI project! This project leverages the power of AI to create and post tweets automatically based on trending topics and detailed research. You can set this up on your local machine using tools from Groq Cloud and CrewAI.

Overview

This application uses a combination of tools to automate the process of finding trending topics, researching them, crafting tweets, and posting them on Twitter. The main components are:

  • Tools: BrowserTool, SearchTool, and TrendsTool for gathering and processing data.
  • Agents: Virtual assistants that use the tools to perform specific tasks.
  • Tasks: Defined actions that agents need to complete.
  • Crew: The overall process that combines agents and tasks to achieve the goal.

Features

  • Trending Topic Research: Identifies current trending topics using Google Trends.
  • Content Research: Conducts in-depth research on trending topics.
  • Twitter Content Creation: Crafts engaging tweets based on researched content.
  • Automated Posting: Posts the generated tweets to Twitter.

Setup Instructions

Prerequisites

Installation

  1. Clone the Repository

  2. Install Dependencies

    pip install -r requirements.txt
  3. Set Up Environment Variables

    Create a .env file in the root directory and add the necessary environment variables:

    MODEL=your_model
    GROQ_API_KEY=your_groq_api_key
    TWITTER_API_KEY=your_twitter_api_key
    TWITTER_API_SECRET_KEY=your_twitter_api_secret_key
    TWITTER_ACCESS_TOKEN=your_twitter_access_token
    TWITTER_ACCESS_TOKEN_SECRET=your_twitter_access_token_secret
    TWITTER_BEARER_TOKEN=your_twitter_bearer_token
    SERPER_API_KEY=your_serper_api_key
    

Running the Application

  1. Start the Application

    python main.py
  2. Follow the Prompts

    The application will prompt you for your niche and then proceed to create and post tweets based on the research it performs.

Usage

Tools

  • BrowserTools: For scraping web pages and summarizing content using Beautiful Soup.
  • SearchTools: For performing Google searches using Serper API.
  • TrendsTools: For fetching trending Google search topics using Pytrends.

Agents

  • Trending Topic Researcher: Uses TrendsTools and BrowserTools to identify and compile trending topics.
  • Content Researcher: Uses BrowserTools and SearchTools to conduct detailed research on topics.
  • Creative Content Creator: Uses the researched content to craft engaging tweets.

Tasks

  • Topic Analysis: Finds and lists trending topics.
  • Content Research: Gathers detailed information on trending topics.
  • Twitter Posts Creation: Crafts and prepares tweets for posting.

Contributing

We welcome contributions! Please fork the repository and create a pull request with your changes.

automate-twitter-posts's People

Contributors

nirkum1330 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.