Code Monkey home page Code Monkey logo

coverletter-generator's Introduction

Cover Letter Generator Using OpenAI's GPT-3.5 API

This program is designed to automatically generate cover letters for multiple job advertisements using the OpenAI GPT-3.5 API. It reads your resume from a text file, and for each job advertisement, it creates a personalized cover letter referencing your resume and saves it as a separate text file.

Updated from original version by Ben-J-Orr

Screenshot

Key Features

  • Resume Input: The program reads your resume from a plain text file, ensuring that it is easy to update and maintain. This allows the AI model to reference your resume when generating cover letters.
  • Multiple Job Advertisements: The program supports generating cover letters for multiple job advertisements at once. Simply add your job advertisement text files to the designated folder, and the program will process each one sequentially.
  • OpenAI GPT-3.5 API: The program uses the advanced GPT-3.5-turbo AI model from OpenAI to generate high-quality, personalized cover letters that reference both your resume and the specific job advertisement.
  • Cover Letter Output: The generated cover letters are saved as separate text files in a designated output folder, making it easy to access, review, and submit them for job applications.
  • JSON Config: Grab your OpenAI API key and additional promt parameters from a JSON file.

Prerequisites

An OpenAI API key is required to use this program. Visit https://beta.openai.com/signup/ to sign up for an API key if you don't have one already.

Ensure you have Python 3.6 or later installed on your system.

Install the openai Python package by running:

pip install openai

Setup

  • Clone the repository or download the source code.
  • Create a config.json file in the root directory of the project with the following content:
{
  "api-key": "your_openai_api_key",
  "additional_prompt_options": "optional_additional_prompt_options"
}
  • Replace * "your_openai_api_key" * with your actual OpenAI API key and * optional_additional_prompt_options * with any additional options you'd like to include in the prompt (e.g., specific instructions or constraints).
  • Create a folder named resume in the same directory as the source code and add a text file named experience.txt containing your resume. Ensure the text file is UTF-8 encoded.
  • Create a folder named Adverts in the same directory as the source code and add job advertisement text files you want to generate cover letters for.
  • Create a folder named outputs in the same directory as the source code. This is where the generated cover letters will be saved.

Usage

  • Open a terminal/command prompt and navigate to the directory containing the source code.
  • Run the program using:
    python main.py
  • The program will display the current job advertisement being processed and generate cover letters for each job advertisement.
  • Upon completion, the generated cover letters will be saved in the outputs folder, with filenames corresponding to the respective job advertisement filenames and an _Output.txt suffix.
  • You can now view and use the generated cover letters for your job applications.

Known Issues

The GPT-3.5 API accepts plain text input and might not interpret formatting elements as expected. Bullet points, special characters, or other formatting elements might be misinterpreted, resulting in an incorrect understanding of your resume and a less effective cover letter.

To avoid these issues, consider converting your resume into plain text before using it with this program. Remove any special characters or formatting elements and use plain text to represent your experience, skills, and other relevant information.

Keep in mind that the simpler and cleaner your resume is, the better the AI model will understand it and generate more effective cover letters.

Acknowledgements

Logo

License

MIT

coverletter-generator's People

Contributors

ben-j-orr avatar abroniewski avatar

Stargazers

Ievgenii avatar  avatar Himanshu  avatar

Watchers

Kostas Georgiou avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.