George_Was_Right leverages a team of AI agents, powered by CrewAI, to analyze recent world events through the lens of themes from George Orwell's 1984. It orchestrates four specialized agents—Researcher, Writer, Illustrator, and Editor—to perform tasks such as:
- Searching for relevant news.
- Comparing news with themes from 1984.
- Writing articles.
- Generating illustration prompts to accompany analyses.
This project aims to provide a nuanced examination of how contemporary society reflects Orwellian concerns about digital privacy and freedom, fostering meaningful discussion and awareness.
- Automated Research and Analysis: Gathers and analyzes news stories in relation to 1984 themes.
- Multi-Agent Collaboration: Uses specialized AI agents (Researcher, Writer, Prompt Master) to divide and conquer complex tasks.
- Visual Prompt Generation: Produces creative prompts for illustrations to enhance storytelling and audience engagement.
- Clear and Structured Output: Outputs organized markdown reports combining research, analysis, and visuals.
- Environment Variable Validation: Validates required environment variables and provides error handling.
- Improved Code Structure: Enhanced code organization and readability.
- LLM Model Support: Integrates various LLM models for enhanced functionality.
- Customizable Search Parameters: Add options for users to specify country and the number of search results for focused research.
- GUI Integration: Develop a user-friendly graphical interface for seamless control of the analysis process.
- Refined Output Formats: Improve markdown and PDF exports for clarity and usability.
- Incremental Feature Rollout: Continuously implement new features while maintaining backward compatibility.
- Automated Research and Analysis: Gathers and analyzes news stories in relation to 1984 themes.
- Multi-Agent Collaboration: Uses specialized AI agents (Researcher, Writer, Prompt Master) to divide and conquer complex tasks.
- Visual Prompt Generation: Produces creative prompts for illustrations to enhance storytelling and audience engagement.
- Clear and Structured Output: Outputs organized markdown reports combining research, analysis, and visuals.
- Environment Variable Validation: Validates required environment variables and provides error handling.
- Improved Code Structure: Enhanced code organization and readability.
- Customizable Search Parameters: Add options for users to specify country and the number of search results for focused research.
- GUI Integration: Develop a user-friendly graphical interface for seamless control of the analysis process.
- Refined Output Formats: Improve markdown and PDF exports for clarity and usability.
- Incremental Feature Rollout: Continuously implement new features while maintaining backward compatibility.
- Main Script: main.py
- Generated Images:
- Generated Images:
- Terminal Output: terminal-output--26-12-2024.md
George-Was-Right is a project I’ve been working on to learn Python. I needed way to get hands-on with programming and not just read about it.
Like a lot of people during the pandemic, I was stuck at home with too much time on my hands. That’s when I decided to finally dive back into coding. I had just finished reading '1984' and taught, “Why not make something in George Orwell’s world?” My first idea was to make a small game. I wasn't really serious about this project until I discovered LLMs, Ollama and CrewAI. My project idea took a hard left turn. It was definitely a stretch for my skills at the time, but I love a good challenge. It forced me to read, learn, and experiment. Plus, who doesn’t like an excuse to Google stuff?
What started as a “just for fun” hobby has turned into something more. I’m working on it in my spare time because, as much as I find it’s fun and satisfying, it doesn't pay the bills.
This consist of the second iteration of George-was-Right. The original version became unmanageable due to accumulating changes and a lack of version control. Starting fresh enabled a focus on better coding practices, structured development, and Git-based version control.
I hope you find this project interesting.
- Importance of planning and incremental development.
- Effective use of Git for managing changes.
- Best practices for Python project structuring and imports.
- Benefits of regular backups and separating development from production environments.
- Keeping notes and documentation updated.
Follow these steps to set up the project:
-
Clone the repository:
git clone https://github.com/TheRealFREDP3D/George_Was_Right.git
-
Navigate to the project directory:
cd George_Was_Right
-
Create a virtual environment:
python -m venv venv
-
Activate the virtual environment:
-
On Windows:
venv\Scripts\activate
-
On macOS/Linux:
source venv/bin/activate
-
-
Install dependencies:
pip install -r requirements.txt
-
Get an API key for free from Github and add it to your .env file.
- Go to the Marketplace and search for "Github API" and click on the "Get it free" button.
- Add the API key to your .env file.
GITHUB_API_KEY=your_github_api_key
- Get an API key for free from SerperDev and add it to your .env file.
SERPER_API_KEY=your_serper_api_key
-
Run the project:
python main.py
The project will run and create logs in the /log folder.
Requirements:
- Python 3.8 or later
- Internet connection for AI-powered agents or use Ollama for local usage.
- Github API key
- SerperDev API key
It's possible to use other LLM models, but you will need to change the model in the .env file and tweak the code in the src/llm.py file. By default I used gpt-4o because it produces the best results without having to pay for it. I have made a lot of tests with other models and I can say that the results are not always good.
Please, be aware that the LLM models have different capabilities and limitations.
Feel free to use the code as you see fit. I'm not a professional programmer, so I'm sure there are many improvements that can be made...
If you have any questions or suggestions, please feel free to contact me or open an issue. And I'm curious and really interested to know what you think about this project and if you have any ideas for improvements.
I would appreciate learning about which models you've tried and what works best for you to add a listing to the documentation.
Contributions are welcome! To contribute:
-
Fork the repository.
-
Create a feature branch:
git checkout -b feature/your-feature-name
-
Commit your changes:
git commit -m "Add your message here"
-
Push the branch to your fork:
git push origin feature/your-feature-name
-
Submit a pull request.
Please ensure changes are well-tested and documented. Refer to the Contribution Guide for more details.
Contact | Links |
---|---|
@TheRealFredP3D | |
GitHub | @TheRealFREDP3D |
[email protected] | |
Link Gallery | LinkGallery |
License: MIT License. See the LICENSE file for details.
Modified: January 5, 2025