Skip to content

Leverages Google GenerativeAI to assist you in writing comprehensive articles

Notifications You must be signed in to change notification settings

badunch/GenAIArticleWriter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

AI-Powered Article Writer

This Python script leverages Google GenerativeAI to assist you in writing comprehensive articles. It provides guidance on structuring your article and generates content for each section.

Features

  • Model Selection: Choose from various GenerativeAI models with different capabilities and rate limits.
  • Article Topic Input: Specify the subject of your article.
  • Step-by-Step Guide Generation: Get an outline for your article, including sections and content suggestions.
  • Content Generation for Sections: Generate text specific to each section of your article.
  • Article Directory Creation: Saves generated content in a designated directory for easy organization.
  • Rate Limiting and Quota Handling: Implements safeguards to respect GenerativeAI's usage limits.

Requirements

  • Python 3.x
  • Google GenerativeAI API (requires an API key)
  • dotenv library (for managing environment variables)
  • google-api-python-client library (for interacting with Google APIs)

Installation

  1. Install the required libraries using pip:

    pip install google-api-python-client dotenv
  2. Obtain a Google GenerativeAI API key and create a .env file in your project directory with the following content:

    GOOGLE_API_KEY=YOUR_API_KEY_HERE
    

Usage

  1. Run the script:

    python article_writer.py
  2. Follow the prompts to select a model, enter your article topic, and write your article.

Example Output

The script will guide you through the writing process, generating an outline and content for your article. This output will be saved in a dedicated directory.

Customization

  • You can modify the MODELS dictionary to include additional GenerativeAI models with their descriptions and rate limits.
  • The generate_article_prompt function can be adjusted to tailor prompts for different content styles or tones.

Disclaimer

  • This script is provided for educational purposes only. Adhere to Google GenerativeAI's terms of service and responsible use guidelines.
  • The quality of generated content may vary depending on the chosen model and provided prompts.

About

Leverages Google GenerativeAI to assist you in writing comprehensive articles

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages