Skip to content

juanchi2203/ai-journalist

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AI Journalist

AI-powered article generator in Italian.

Features

  • Article generation from press releases using AI
  • HTML formatting for web publishing
  • Modular, extensible codebase

Quickstart

  1. Clone the repo
  2. Install requirements: pip install -r requirements.txt
  3. Set your OpenAI API key as an environment variable.
  4. Run the demo in tester.py
  5. In tester.py, change the "topic" value and the "article_type" parameter ('editoriale', 'cronaca', 'intervista') to see different outputs.

Technical Details

  • Project modularization.
  • Asynchronous calls to OpenAI API for efficiency
  • Use different models according to the task:
    • GPT-4.1 for articles as it can handle higher token limits.
    • GPT-4o-mini for date extraction due to its cost-effectiveness.
  • Use of Jinja2 for dynamic prompt engineering.
  • Use of Pydantic for structured data handling.
  • Attention to detail: handling of dates and deictics, and interruptions in interviews.
  • HTML formatting for easy web integration.

Potential Improvements

  • Use of RAG or tool use (via MCP) to fetch relevant news articles for context. Editorial and Interview genres would particularly benefit by setting a vector knowledgebase.
  • Hosting an API for make the service accessible.
  • Handle several languages or add translation microservice.
  • Handle more article genres.
  • Add file import for input the article sources.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages