#!/bin/sh

if [ $# != 1 ] ; then
  echo "The script $(basename $0) takes exactly one argument"
  exit 1
fi

if [ ! -e $1 ] ; then
  echo "$(basename $0): File $1 not found"
  exit 1
fi

debgpt -Hf $1 -QA 'Take the draft and turn it into professional and constructive text targeting at an IT audience do please keep it short and precise.  Please also skip phrases like "I hope this message finds you well." Just give me the main body, no welcome in the beginning or greeting at the end but make sure the message remains kind and friendly. Please limit the length of your answer to about the size of my draft.'

exit

The -H flag will hide the initial prompt (for cleaner screen outout).
The -f flag will read the draft.txt file and load it to the prompt.
The -Q flag will let the program quit after responding the first question, or it
will fall into the interaction loop with the user.
The -A/-a will supply question to the end of context.


Google's Gemini is free with some query-per-minute limits. One needs a google
account, and create an API key in the google console:

https://aistudio.google.com/app/apikey
This is documented in debgpt configurator:
https://salsa.debian.org/deeplearning-team/debgpt/-/blob/main/debgpt/configurator.py?ref_type=heads#L226

You can follow this link to find the latest google models:
https://salsa.debian.org/deeplearning-team/debgpt/-/blob/main/debgpt/configurator.py?ref_type=heads#L234

Since they still require private API keys, it's not easy to provide
samples. The debgpt configurator already made the configuration
process as smooth as possible.

