Word Doc Automation is a Python project that automates the generation of meeting minutes as a Microsoft Word document. The project leverages the python-docx library to work with Word files and the OpenAI API (using the GPT-3.5-turbo model) to generate meeting content based on a provided context.
The project follows these main steps:
-
Input Context:
The meeting details (agenda, discussions, decisions, etc.) are provided via a pre-defined context incontext.py. This context is used both as a prompt for generating a refined meeting minutes JSON and as a source of static content. -
Generating Meeting Minutes:
Themain.pyscript constructs a prompt using the meeting context and calls the OpenAI API to generate a JSON response. This JSON contains the meeting title, summary, key discussions, decisions, team assignments, and next meeting details. In case the API call fails, a default JSON is used. -
Template Creation and Filling:
A Word template is created usingtemplate.py. This template includes placeholders (denoted by{}) for different sections like Meeting Summary, Key Discussions, Decisions, etc.
The functionfill_template_documentinmain.pythen reads the generated JSON content and replaces the placeholders in the template with the actual content. -
Output:
The final filled-in Word document is saved in thegenerated_docsfolder with a timestamped filename.
-
Python 3.6+
-
Install required Python packages:
python-docxopenai
You can install these via pip:
pip install python-docx openai