Note: This is a forked version of the original GPT Newspaper project with various bugs resolved and improvements made for better stability and functionality.
Welcome to the GPT Newspaper project, an innovative autonomous agent designed to create personalized newspapers tailored to user preferences. GPT Newspaper revolutionizes the way we consume news by leveraging the power of AI to curate, write, design, and edit content based on individual tastes and interests.
GPT Newspaper consists of six specialized sub-agents in LangChain's new LangGraph Library:
- Search Agent: Scours the web for the latest and most relevant news.
- Curator Agent: Filters and selects news based on user-defined preferences and interests.
- Writer Agent: Crafts engaging and reader-friendly articles.
- Critique Agent Provide feedback to the writer until article is approved.
- Designer Agent: Layouts and designs the articles for an aesthetically pleasing reading experience.
- Editor Agent: Constructs the newspaper based on produced articles.
- Publisher Agent Publishes the newspaper to the frontend or desired service
Each agent plays a critical role in delivering a unique and personalized newspaper experience.
gpt-newspaper-demo.1.mp4
- Personalized Content: Get news that aligns with your interests and preferences.
- Diverse Sources: Aggregates content from a wide range of reputable news sources.
- Engaging Design: Enjoy a visually appealing layout and design.
- Quality Assurance: Rigorous editing ensures reliable and accurate news reporting.
- User-Friendly Interface: Easy-to-use platform for setting preferences and receiving your newspaper.
- Setting Preferences: Users input their interests, preferred topics, and news sources.
- Automated Curation: The Search and Curator Agents find and select news stories.
- Content Creation: The Writer Agent drafts articles, which are then designed by the Designer Agent.
- Newspaper Design: The Editor Agent reviews and finalizes the content.
- Delivery: Users receive their personalized newspaper to their mailbox.
-
Clone the repo
git clone https://github.com/your-username/gpt-newspaper.git
-
Set up your API Keys
Copy the
.env.distfile to.envand add your API keys:cp .env.dist .env
Then edit the
.envfile and replace the placeholder values with your actual API keys:TAVILY_API_KEY=your_actual_tavily_api_key OPENAI_API_KEY=your_actual_openai_api_key MODEL_NAME=gpt-4-1106-preview # Optional: Change the model to useAlternatively, you can export them as environment variables:
export TAVILY_API_KEY=<YOUR_TAVILY_API_KEY> export OPENAI_API_KEY=<YOUR_OPENAI_API_KEY>
-
Install Requirements
pip install -r requirements.txt
-
Validate your environment setup (optional but recommended)
python validate_env.py
-
Run the app
python app.py
-
Open the app in your browser
http://localhost:5000/
-
Enjoy!
Interested in contributing to GPT Newspaper? We welcome contributions of all kinds!
GPT Newspaper is an experimental project and provided "as-is" without any warranty. It's intended for personal use and not as a replacement for professional news outlets.
