This Python script utilizes a Large Language Model (LLM) to review and provide feedback on PowerPoint presentations (PPT). The program analyzes the content, structure, and overall quality of the presentation, offering a comprehensive review.
https://github.com/2BlackCoffees/ppt2gpt
Please note that this script is highly configurable and should only be used with an LLM endpoint that ensures the privacy and security of your requests, especially when dealing with confidential information.
The program offers multiple review approaches, including:
The script is designed to be extensible, allowing users to create new custom requests that can be integrated into any of the above analysis. To achieve this, a JSON file must be created with the following schema:
[ { "request_name": "My request name", "request": "Detail your request here.", "temperature": 0.3, "top_p": 0.7 } ]
This JSON file must be referenced using an environment variable. Please see the documentation for more information on this process.
The program incorporates a backoff retry mechanism out of the box. However, if the number of tokens exceeds the limit, the script will stop executing. Currently, the only solution is to split the presentation into smaller parts. Note that token counting is not implemented, as this feature depends on the specific LLM being used.
Ensure that Python3 and openai libraries are installed.
Run pip install -r magic-document-enhancer/requirements.txt
The following environment variables are required to run the program:
OPENAI_BASE_URL
: The URL adress of your LLM (For example: https://api.openai.com/v1
)OPENAI_API_KEY
: Your OpenAI API keyPPT2LLM_REQUESTS_SLIDE_TEXT
: Path to the JSON file containing your additional requests for text in slide per slidePPT2LLM_REQUESTS_SLIDE_ARTISTIC
: Path to the JSON file containing your additional requests for artistic review in slide per slidePPT2LLM_REQUESTS_DECK_TEXT
: Path to the JSON file containing your additional requests for text in overall deck and flowTo run the program, use the following command:
python ppt2gpt [options]
The program accepts the following options:
--from_document
FROM_DOCUMENT--model_name
MODEL_NAME--skip_slides
SKIP_SLIDES--only_slides
ONLY_SLIDES--text_slide_requests
TEXT_SLIDE_REQUESTS--no_text_slide_requests
--artistic_slide_requests
ARTISTIC_SLIDE_REQUESTS--no_artistic_slide_requests
--deck_requests
DECK_REQUESTS--no_deck_requests
Skip deck check--detailed_analysis
Select a detailed analysis or high level one--reviewer_name
REVIEWER_NAME--debug
Set logging to debug--force_top_p
FORCE_TOP_P--force_temperature
FORCE_TEMPERATURE--simulate_calls_only
The program uses the llama3-70b
LLM model by default. You can specify a different model using the --model_name
option.
python ppt2gpt.py --text_slide_requests 0,1,2 --deck_requests 0,1,2,3 presentation.pptx Review a PPT for artistic and expert feedback: python ppt2gpt.py --artistic_slide_requests 0,1,2 --deck_requests 5,6,7,8,9 presentation.pptx
If you encounter any issues, please check the logs for error messages.
Make sure to set the environment variables correctly.
If you're using a custom LLM model, ensure that it's properly configured and accessible