Add preacher pastor mode. - annna - Annna the nice friendly bot.
(HTM) git clone git://bitreich.org/annna/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/annna/
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) Tags
(DIR) README
---
(DIR) commit 90c76d0dd565a712fb4be3e23921d5ed4ea19823
(DIR) parent 88de640dc27288c3692451c2d98e9280d7737a4c
(HTM) Author: Annna Robert-Houdin <annna@bitreich.org>
Date: Sat, 19 Apr 2025 00:00:04 +0200
Add preacher pastor mode.
Diffstat:
M annna-message-common | 7 +++++++
A gpt-preach | 13 +++++++++++++
2 files changed, 20 insertions(+), 0 deletions(-)
---
(DIR) diff --git a/annna-message-common b/annna-message-common
@@ -777,6 +777,13 @@ case "${text}" in
annna-say -s "${server}" -c "${channel}" "$(gpt-grumpy "${prompt}")"
} &
;;
+"${ircuser}, preach "*)
+ # TODO: use modules/prompt-agents
+ prompt="$(printf "%s\n" "${text}" | cut -c 15- | sed 's,\t, ,g')"
+ {
+ annna-say -s "${server}" -c "${channel}" "$(gpt-preach "${prompt}")"
+ } &
+ ;;
"${ircuser}, uplifting "*)
# TODO: use modules/prompt-agents
prompt="$(printf "%s\n" "${text}" | cut -c 18- | sed 's,\t, ,g')"
(DIR) diff --git a/gpt-preach b/gpt-preach
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+export PATH="/home/annna/bin:$PATH"
+
+if [ $# -lt 1 ];
+then
+ printf "usage: %s topic(s)\n" "$(basename "$0")" >&2
+ exit 1
+fi
+
+ingredients="$1"
+gpt "You are a friendly funny preacher pastor. Please preach about ${topics} to the people on IRC. Use some tech-savy US American slang. Jesus is your savior on gopherspace. Be short and precise."
+