Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AI Financial Report Generator

An AI-powered financial report generator that fetches live stock or forex data, summarizes it using OpenAI’s GPT, and emails the report automatically. Built by Layne Singh.


Features

  • Fetches live stock updates or forex rates from public APIs.
  • Generates concise summaries using ChatGPT.
  • Sends automatic email reports with formatted content.
  • Error handling for API, OpenAI, and email issues.

Getting Started

1. Clone the repository

git clone https://github.com/LS-hash-tech/ai_reporter_project.git cd ai_reporter_project 2. Create a .env file Create a .env in the project root: OPENAI_API_KEY=your_openai_api_key EMAIL_ADDRESS=your_gmail_address EMAIL_PASSWORD=your_gmail_app_password Never commit .env — it contains sensitive keys. 3. Install dependencies pip install -r requirements.txt If you don’t have a requirements.txt yet, the main dependencies are: pip install openai python-dotenv requests Usage Run the script with: python ai_reporter.py <recipient_email> <report_type>

Example: python ai_reporter.py your_email@example.com stock_update python ai_reporter.py your_email@example.com forex_update <report_type> must be either stock_update or forex_update. Email Format Emails will include: Friendly AI intro Latest stock or forex data Summary generated by GPT Personalized sign-off

Example:

"Hey!

I am an AI-powered financial report generator that Layne built. It fetches live stock or forex data, summarizes it using ChatGPT, and emails the report automatically.

Here is the latest stock update:

  • Current Price: $262.82

Speak soon!"

Layne's AI-powered financial report generator

Notes Uses Gmail SMTP with an App Password (not your regular Gmail password). Handles connection issues, API errors, and OpenAI rate limits gracefully. .env is ignored in Git to keep secrets safe.

License This project is licensed under the MIT License.

About

AI-powered financial report generator, fetches live stock/forex data, summarizes with GPT, and emails the report automatically.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages