Additional inputs for Describe functionality
This commit is contained in:
parent
efaa5c4306
commit
ad184d778d
5 changed files with 239 additions and 38 deletions
|
|
@ -4,10 +4,14 @@ set -euo pipefail
|
|||
SCRIPT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)"
|
||||
STATE_FILE="${SCRIPT_DIR}/.personality_index"
|
||||
|
||||
IN_DIR="${1:?Usage: $0 <input-dir> [\"Title\"] [\"Location\"] [max_frames]}"
|
||||
IN_DIR="${1:?Usage: $0 <input-dir> [\"Title\"] [\"Location\"] [max_frames] [additional_prompt]}"
|
||||
TITLE="${2:-}"
|
||||
LOCATION="${3:-}"
|
||||
MAX_FRAMES="${4:-12}"
|
||||
ADDITIONAL_PROMPT="${5:-}"
|
||||
if [ "$ADDITIONAL_PROMPT" = "no-append" ]; then
|
||||
ADDITIONAL_PROMPT=""
|
||||
fi
|
||||
|
||||
# Source system-wide Gemini API key if present so the webserver can run this as www-data.
|
||||
if [ -f /etc/mvlog/gemini.env ]; then
|
||||
|
|
@ -117,6 +121,15 @@ if [ -z "$TITLE" ]; then
|
|||
TITLE="$(basename "$IN_DIR")"
|
||||
fi
|
||||
|
||||
ADDITIONAL_PROMPT_BLOCK=""
|
||||
if [ -n "$ADDITIONAL_PROMPT" ]; then
|
||||
ADDITIONAL_PROMPT_BLOCK=$(cat <<EOF
|
||||
Additional infos/guidelines:
|
||||
$ADDITIONAL_PROMPT
|
||||
EOF
|
||||
)
|
||||
fi
|
||||
|
||||
PERSONALITIES=(
|
||||
"You should talk like Shoresy: fearless Canadian hockey-player energy, confidence, chirping, competitiveness, profanity, loyalty, roasting, locker-room humor."
|
||||
|
||||
|
|
@ -154,7 +167,7 @@ The Danish sentence must be witty, warm, cultured, playful, gently satirical, an
|
|||
|
||||
Use the following personality and write entirely in that style:
|
||||
"$PERSONALITY"
|
||||
|
||||
${ADDITIONAL_PROMPT_BLOCK}
|
||||
Then create a teaser in English.
|
||||
The teaser must be max. 32 words.
|
||||
It should make someone want to click and read more.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue