An intelligent bot that engages with AI-focused communities on Reddit by generating contextually relevant comments using local LLMs. The bot automatically discovers AI-related subreddits, tracks trending topics, and maintains high-quality interactions to contribute to discussions in an engaging and meaningful way.
- Smart Subreddit Discovery: Automatically identifies and engages with AI-focused communities.
- Real-time AI Trend Monitoring:
- Tracks latest papers from arXiv
- Finds trending GitHub repositories
- Keeps up with current AI news
- Intelligent Comment Generation:
- Generates topic-aware responses
- Includes sentiment analysis
- Ensures technical accuracy
- Engages naturally with users
- Quality Control:
- Removes low-performing comments automatically
- Tracks successful comment patterns
- Optimizes for better engagement
- Python 3.8+
- Ollama with
llama3.2model - Reddit API credentials
- News API key
-
Clone the Repository:
git clone https://github.com/yourusername/ai-reddit-bot.git cd reddit-ai-bot -
Install Dependencies:
pip install -r requirements.txt
-
Set Up Configuration: Open
secret.pywith your API credentials:REDDIT_CLIENT_ID = "client-id" REDDIT_CLIENT_SECRET = "client-secret" REDDIT_USERNAME = "username" REDDIT_PASSWORD = "password" NEWS_API_KEY = "newsapi-key"
To run the bot, execute:
python main.py- Subreddit Discovery: Adjust parameters in
AI_SUBREDDITS. - Topic Categories: Modify topics in
AI_TOPICS. - Comment Generation: Configure templates in
comment.py. - Timing & Rate Limits: Set custom limits for better control.
- Fork the repository.
- Create your feature branch.
- Commit your changes.
- Push to the branch.
- Open a Pull Request.
This project is licensed under the MIT License - feel free to use and modify as needed.
Made with ❤️ by dxd Leveraging Ollama, LangChain, and the Reddit API via PRAW.