Repository navigation
以下是当前版本的 Release Note,包含了所有新增功能和优化内容:
Release Notes - Version 1.0.0
New Features:
-
Gradio Interface for Report Generation & Browsing:
- Added a Gradio UI with separate tabs for Democrat and Republican parties.
- Each tab includes a button to generate the day’s report and a dropdown for browsing historical reports.
- The interface allows users to view generated reports and easily navigate between different party reports.
-
AI-Powered News Analysis:
- Integrated OpenAI GPT-4 (and GPT-3.5 as fallback) to analyze news articles from both parties.
- The AI provides insights based on each party's focus areas, helping identify key themes and strategies.
-
Automated Daily Report Generation:
- Implemented an automated task scheduler that runs daily to fetch news articles, generate reports, and send email notifications.
- The system immediately executes the scheduled task upon program startup and continues at predefined intervals.
-
Email Notifications:
- Reports generated are automatically emailed to recipients specified in the configuration.
- Added markdown-to-HTML conversion for sending well-formatted reports via email.
Improvements:
-
Optimized OpenAI API Calls:
- Introduced batch processing to handle multiple news articles efficiently without exceeding token limits.
- Implemented content summarization for longer news articles to reduce token usage while maintaining key information.
- Introduced delays between API calls to prevent exceeding OpenAI rate limits.
-
Separate Report Generators:
- Created separate
ReportGeneratorinstances for Democrat and Republican news articles to ensure clarity and maintain modularity in report processing.
- Created separate
-
Configurable Model Selection:
- Added flexibility to switch between
gpt-4andgpt-3.5-turbomodels based on token usage needs, ensuring smoother operation and cost-effectiveness.
- Added flexibility to switch between
Bug Fixes:
- Resolved Token Limit Error (Error 429):
- Addressed an issue where fetching and analyzing a large number of news articles exceeded OpenAI’s token limits, resulting in request failures.
- This was mitigated by batching articles and introducing rate limits for API calls.
This release provides a fully functional report generation and analysis system, with optimized API usage to handle larger volumes of news articles while ensuring reports are generated and delivered reliably.