# Crypto News Generator
Crypto News Generator is a Python-based project that fetches blockchain data using Alchemy API, analyzes it, and generates insightful reports using OpenAI's GPT-3.5 API. This tool is designed to help users gain meaningful insights from blockchain transactions.
## Table of Contents
- [Installation](#installation)
- [Setup](#setup)
- [Usage](#usage)
- [Project Structure](#project-structure)
- [API Keys](#api-keys)
- [Generating Reports](#generating-reports)
- [Contributing](#contributing)
- [License](#license)
## Installation
To get started, clone the repository and set up your Python virtual environment:
```bash
git clone https://github.com/YOUR_GITHUB_USERNAME/crypto-news-generator.git
cd crypto-news-generator
python -m venv venv
.\venv\Scripts\activate
pip install -r requirements.txt
Ensure you have the necessary API keys from Alchemy and OpenAI. Create a .env
file in the root directory and add your keys:
OPENAI_API_KEY=YOUR_OPENAI_API_KEY
ALCHEMY_API_KEY=YOUR_ALCHEMY_API_KEY
To fetch blockchain data and generate reports, you need to run the data_analyzer.py
and report_generator.py
scripts.
Run the following command to analyze blockchain data:
python data_analyzer.py
Run the following command to generate a report based on the analyzed blockchain data:
python report_generator.py
crypto-news-generator/
├── .env # Environment variables
├── .gitignore # Git ignore file
├── data_analyzer.py # Script to analyze blockchain data
├── report_generator.py # Script to generate report
├── requirements.txt # Project dependencies
├── venv/ # Python virtual environment
└── README.md # Project documentation
You will need two API keys for this project:
- Alchemy API Key: To fetch blockchain data.
- OpenAI API Key: To generate insightful reports using GPT-3.5.
Add these keys to your .env
file as shown in the Setup section.
The report generation process involves two main steps:
The data_analyzer.py
script fetches the latest blockchain data using the Alchemy API and analyzes it to extract meaningful information.
The report_generator.py
script uses OpenAI's GPT-3.5 API and Langchain to generate a detailed report based on the analysis. Langchain helps in managing and chaining together the language model prompts and outputs efficiently.
Contributions are welcome! Please fork the repository and create a pull request with your changes. Ensure your code follows the project's coding standards and includes appropriate tests.
This project is licensed under the MIT License.