Introduction
Introduction Statistics Contact Development Disclaimer Help
SECRET - annna - Annna the nice friendly bot.
git clone git://bitreich.org/annna/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws6…
Log
Files
Refs
Tags
README
---
commit 395dfe746bf84d40dc02fa8e2771ef24609946ee
parent 21c9fdd28da4f3d4b9f5211a669981bb7c576978
Author: Annna Robert-Houdin <[email protected]>
Date: Sat, 19 Jul 2025 14:12:54 +0200
SECRET
Diffstat:
M annna-message-common | 46 ++++++++++++++++-------------…
M gpt | 88 +++++++++++++++++++++--------…
M modules/prompt-agents/color-weathe… | 2 +-
M modules/prompt-agents/funny-weathe… | 2 +-
M modules/prompt-agents/grumpy-fart.… | 2 +-
M modules/prompt-agents/luther.promp… | 2 +-
M modules/prompt-agents/modem.prompt… | 2 +-
M modules/prompt-agents/preacher.pro… | 2 +-
M modules/prompt-agents/prophet.prom… | 2 +-
M modules/prompt-agents/sadh_guru.pr… | 2 +-
M modules/prompt-agents/santa.prompt… | 2 +-
M modules/prompt-agents/sigmund-freu… | 2 +-
M modules/prompt-agents/teleromeo.pr… | 2 +-
M modules/prompt-agents/trump.prompt… | 2 +-
M modules/prompt-agents/uplifting.pr… | 2 +-
15 files changed, 96 insertions(+), 64 deletions(-)
---
diff --git a/annna-message-common b/annna-message-common
@@ -770,28 +770,28 @@ case "${text}" in
annna-say -s "${server}" -c "${channel}" "$(gpt "${prompt}. Pl…
} &
;;
-"${ircuser}, grumpy "*)
- personality="grumpy-fart"
+"Preacher, "*|"preacher, "*)
+ personality="preacher"
preprompt="$(cat ${modbase}/prompt-agents/${personality}.prompt.txt)"
- prompt="$(printf "%s\n" "${text}" | cut -d' ' -f 3- | sed 's,\t, ,g…
+ prompt="$(printf "%s\n" "${text}" | cut -d' ' -f 2- | sed 's,\t, ,g…
{
- annna-say -s "${server}" -c "${channel}" "$(gpt "System:${prep…
+ annna-say -s "${server}" -c "${channel}" "$(gpt "System: ${pre…
} &
;;
-"${ircuser}, preach "*)
- personality="preacher"
+"Uplift, "*|"uplift, "*)
+ personality="uplifting"
preprompt="$(cat ${modbase}/prompt-agents/${personality}.prompt.txt)"
- prompt="$(printf "%s\n" "${text}" | cut -d' ' -f 3- | sed 's,\t, ,g…
+ prompt="$(printf "%s\n" "${text}" | cut -d' ' -f 2- | sed 's,\t, ,g…
{
- annna-say -s "${server}" -c "${channel}" "$(gpt "System:${prep…
+ annna-say -s "${server}" -c "${channel}" "$(gpt "System: ${pre…
} &
;;
-"${ircuser}, uplifting "*)
- personality="uplifting"
+"Grumpy, "*|"grumpy, "*)
+ personality="grumpy-fart"
preprompt="$(cat ${modbase}/prompt-agents/${personality}.prompt.txt)"
- prompt="$(printf "%s\n" "${text}" | cut -d' ' -f 3- | sed 's,\t, ,g…
+ prompt="$(printf "%s\n" "${text}" | cut -d' ' -f 2- | sed 's,\t, ,g…
{
- annna-say -s "${server}" -c "${channel}" "$(gpt "System:${prep…
+ annna-say -s "${server}" -c "${channel}" "$(gpt "System: ${pre…
} &
;;
"Santa, "*|"Sannnta, "*|"santa, "*|"sannnta, "*)
@@ -799,7 +799,7 @@ case "${text}" in
preprompt="$(cat ${modbase}/prompt-agents/${personality}.prompt.txt)"
prompt="$(printf "%s\n" "${text}" | cut -d' ' -f 2- | sed 's,\t, ,g…
{
- annna-say -s "${server}" -c "${channel}" "$(gpt "System:${prep…
+ annna-say -s "${server}" -c "${channel}" "$(gpt "System: ${pre…
} &
;;
"Satan, "*|"Satannn, "*|"satan, "*|"satannn, "*)
@@ -807,7 +807,7 @@ case "${text}" in
preprompt="$(cat ${modbase}/prompt-agents/${personality}.prompt.txt)"
prompt="$(printf "%s\n" "${text}" | cut -d' ' -f 2- | sed 's,\t, ,g…
{
- annna-say -s "${server}" -c "${channel}" "$(gpt "System:${prep…
+ annna-say -s "${server}" -c "${channel}" "$(gpt "System: ${pre…
} &
;;
"Trump, "*|"trump, "*)
@@ -815,7 +815,7 @@ case "${text}" in
preprompt="$(cat ${modbase}/prompt-agents/${personality}.prompt.txt)"
prompt="$(printf "%s\n" "${text}" | cut -d' ' -f 2- | sed 's,\t, ,g…
{
- annna-say -s "${server}" -c "${channel}" "$(gpt "System:${prep…
+ annna-say -s "${server}" -c "${channel}" "$(gpt "System: ${pre…
} &
;;
"Freud, "*|"freud, "*|"Sigmund, "*|"sigmund, "*)
@@ -823,7 +823,7 @@ case "${text}" in
preprompt="$(cat ${modbase}/prompt-agents/${personality}.prompt.txt)"
prompt="$(printf "%s\n" "${text}" | cut -d' ' -f 2- | sed 's,\t, ,g…
{
- annna-say -s "${server}" -c "${channel}" "$(gpt "System:${prep…
+ annna-say -s "${server}" -c "${channel}" "$(gpt "System: ${pre…
} &
;;
"Teleromeo, "*|"teleromeo, "*)
@@ -831,7 +831,7 @@ case "${text}" in
preprompt="$(cat ${modbase}/prompt-agents/${personality}.prompt.txt)"
prompt="$(printf "%s\n" "${text}" | cut -d' ' -f 2- | sed 's,\t, ,g…
{
- annna-say -s "${server}" -c "${channel}" "$(gpt "System:${prep…
+ annna-say -s "${server}" -c "${channel}" "$(gpt "System: ${pre…
} &
;;
"Modem, "*|"modem, "*)
@@ -839,7 +839,7 @@ case "${text}" in
preprompt="$(cat ${modbase}/prompt-agents/${personality}.prompt.txt)"
prompt="$(printf "%s\n" "${text}" | cut -d' ' -f 2- | sed 's,\t, ,g…
{
- annna-say -s "${server}" -c "${channel}" "$(gpt "System:${prep…
+ annna-say -s "${server}" -c "${channel}" "$(gpt "System: ${pre…
} &
;;
"Sadh_Guru, "*|"Sadh_guru, "*|"sadh_guru, "*|"sadh_Guru, "*)
@@ -847,7 +847,7 @@ case "${text}" in
preprompt="$(cat ${modbase}/prompt-agents/${personality}.prompt.txt)"
prompt="$(printf "%s\n" "${text}" | cut -d' ' -f 2- | sed 's,\t, ,g…
{
- annna-say -s "${server}" -c "${channel}" "$(gpt "System:${prep…
+ annna-say -s "${server}" -c "${channel}" "$(gpt "System: ${pre…
} &
;;
"Prophet, "*|"prophet, "*)
@@ -855,7 +855,7 @@ case "${text}" in
preprompt="$(cat ${modbase}/prompt-agents/${personality}.prompt.txt)"
prompt="$(printf "%s\n" "${text}" | cut -d' ' -f 2- | sed 's,\t, ,g…
{
- annna-say -s "${server}" -c "${channel}" "$(gpt "System:${prep…
+ annna-say -s "${server}" -c "${channel}" "$(gpt "System: ${pre…
} &
;;
"Luther, "*|"luther, "*)
@@ -863,7 +863,7 @@ case "${text}" in
preprompt="$(cat ${modbase}/prompt-agents/${personality}.prompt.txt)"
prompt="$(printf "%s\n" "${text}" | cut -d' ' -f 2- | sed 's,\t, ,g…
{
- annna-say -s "${server}" -c "${channel}" "$(gpt "System:${prep…
+ annna-say -s "${server}" -c "${channel}" "$(gpt "System: ${pre…
} &
;;
"${ircuser}, wolfram is "*)
@@ -974,13 +974,13 @@ case "${text}" in
then
prompt="$(printf "%s\n" "${weathertext}" | cut -d' ' -…
{
- annna-say -s "${server}" -c "${channel}" "${us…
+ annna-say -s "${server}" -c "${channel}" "${us…
} &
else
weathertext="there is no weather at ${weatherplace}"
prompt="${weathertext}"
{
- annna-say -s "${server}" -c "${channel}" "${us…
+ annna-say -s "${server}" -c "${channel}" "${us…
} &
fi
} &
diff --git a/gpt b/gpt
@@ -1,41 +1,73 @@
#!/bin/sh
-#ggmlbase="/br/ai/ggml"
-ggmlbase="/br/ai/llama.cpp"
-#ggmlbin="./build/bin/gpt-2"
-ggmlbin="./build/bin/llama-cli"
-#ggmlmodel="models/gpt-2-1558M/ggml-model.bin"
-ggmlmodel="models/Meta-Llama-3.1-8B-Instruct-Q4_K_M.gguf"
-ggmlntokens="$((69 * 2))"
+export PATH="$HOME/bin:$PATH"
-cd $ggmlbase
-if mountpoint -q /br/ai/tmp;
-then
- ggmlbasename="$(basename "${ggmlmodel}")"
- ggmltmppath="/br/ai/tmp/${ggmlbasename}"
- [ ! -r "${ggmltmppath}" ] && cp "$ggmlmodel" /br/ai/tmp
- [ -r "${ggmltmppath}" ] && ggmlmodel="${ggmltmppath}"
-fi
+function local_llama() {
+ #ggmlbase="/br/ai/ggml"
+ ggmlbase="/br/ai/llama.cpp"
+ #ggmlbin="./build/bin/gpt-2"
+ ggmlbin="./build/bin/llama-cli"
+ #ggmlmodel="models/gpt-2-1558M/ggml-model.bin"
+ ggmlmodel="models/Meta-Llama-3.1-8B-Instruct-Q4_K_M.gguf"
+ ggmlntokens="$((69 * 2))"
-prompt="$1"
-if [ -z "$prompt" ];
-then
- cat \
+ cd $ggmlbase
+ if mountpoint -q /br/ai/tmp;
+ then
+ ggmlbasename="$(basename "${ggmlmodel}")"
+ ggmltmppath="/br/ai/tmp/${ggmlbasename}"
+ [ ! -r "${ggmltmppath}" ] && cp "$ggmlmodel" /br/ai/tmp
+ [ -r "${ggmltmppath}" ] && ggmlmodel="${ggmltmppath}"
+ fi
+
+ prompt="$1"
+ if [ -z "$prompt" ];
+ then
+ cat \
| $ggmlbin -m $ggmlmodel -n $ggmlntokens -t 3 \
--no-warmup --simple-io --no-display-prompt --grammar …
-cnv 2>/dev/null \
| sed -E '/^$/d;s/^>[[:blank:]]+//;q'
-else
- printf "%s\n" "${prompt}" \
+ else
+ printf "%s\n" "${prompt}" \
| $ggmlbin -m $ggmlmodel -n $ggmlntokens -t 3 \
--no-warmup --simple-io --no-display-prompt --grammar …
-cnv 2>/dev/null \
| sed -E '/^$/d;s/^>[[:blank:]]+//;q'
-fi
-#$ggmlbin -m $ggmlmodel -n $ggmlntokens \
-# --simple-io --no-display-prompt --grammar 'root ::= ([^\x00-\x1F])*' \
-# -p "$1" 2>/dev/null \
-# | head -n1 \
-# | sed -E 's/^[[:blank:]]+//;s/[[:blank:]]*\[end of text\]$//' \
-# | tr -d '"'
+ fi
+ #$ggmlbin -m $ggmlmodel -n $ggmlntokens \
+ # --simple-io --no-display-prompt --grammar 'root ::= ([^\x00-\…
+ # -p "$1" 2>/dev/null \
+ # | head -n1 \
+ # | sed -E 's/^[[:blank:]]+//;s/[[:blank:]]*\[end of text\]$//'…
+ # | tr -d '"'
+}
+
+function remote_llama() {
+ prompt="$1"
+ if [ -z "$prompt" ];
+ then
+ cat \
+ | ollama-gpu \
+ ollama run \
+ --hidethinking \
+ --nowordwrap \
+ llama3:8b \
+ "${prompt}" \
+ | head -n 1
+ else
+ printf "%s\n" "${prompt}" \
+ | ollama-gpu \
+ ollama run \
+ --hidethinking \
+ --nowordwrap \
+ llama3:8b \
+ "${prompt}" \
+ | head -n 1
+ fi
+}
+
+prompt="$1"
+remote_llama "${prompt}"
+[ $? -gt 0 ] && local_llama "${prompt}"
diff --git a/modules/prompt-agents/color-weather-reporter.prompt.txt b/modules/…
@@ -1,2 +1,2 @@
-System: You are an artist weather reporter. Please keep the answer to just the…
+You are an artist weather reporter. Please keep the answer to just the colors.…
diff --git a/modules/prompt-agents/funny-weather-reporter.prompt.txt b/modules/…
@@ -1,2 +1,2 @@
-System: You are a funny weather reporter. Please keep the answer to two senten…
+You are a funny weather reporter. Please keep the answer to two sentences. Mak…
diff --git a/modules/prompt-agents/grumpy-fart.prompt.txt b/modules/prompt-agen…
@@ -1,2 +1,2 @@
-System: Your are a grumpy old Internet fart. Your sex life always has been mis…
+Your are a grumpy old Internet fart. Your sex life always has been miserable. …
diff --git a/modules/prompt-agents/luther.prompt.txt b/modules/prompt-agents/lu…
@@ -1,2 +1,2 @@
-System: You are Martin Luther, the reformater of Christianity. Please keep the…
+You are Martin Luther, the reformater of Christianity. Please keep the answer …
diff --git a/modules/prompt-agents/modem.prompt.txt b/modules/prompt-agents/mod…
@@ -1,2 +1,2 @@
-System: You are an old 9660 baud modem. Please keep the answer to two sentence…
+You are an old 9660 baud modem. Please keep the answer to two sentences. Pleas…
diff --git a/modules/prompt-agents/preacher.prompt.txt b/modules/prompt-agents/…
@@ -1,2 +1,2 @@
-System: You are a friendly funny preacher pastor. Please preach about the foll…
+You are a friendly funny preacher pastor. Use some tech-savy US American slang…
diff --git a/modules/prompt-agents/prophet.prompt.txt b/modules/prompt-agents/p…
@@ -1,2 +1,2 @@
-System: You are a prophet of gopherspace. Please answer in two sentences.
+You are a prophet of gopherspace. Please answer in two sentences.
diff --git a/modules/prompt-agents/sadh_guru.prompt.txt b/modules/prompt-agents…
@@ -1,2 +1,2 @@
-System: You are Sadh Guru, the Indian guru. Please keep the answer to two sent…
+You are Sadh Guru, the Indian guru. Please keep the answer to two sentences.
diff --git a/modules/prompt-agents/santa.prompt.txt b/modules/prompt-agents/san…
@@ -1,2 +1,2 @@
-System: You are a happy funny Santa Clause on christmas eve. Please keep the a…
+You are a happy funny Santa Clause on christmas eve. Please keep the answer to…
diff --git a/modules/prompt-agents/sigmund-freud.prompt.txt b/modules/prompt-ag…
@@ -1,2 +1,2 @@
-System: You are Sigmund Freud giving positive advice in analysis of the said. …
+You are Sigmund Freud giving positive advice in analysis of the said. Please a…
diff --git a/modules/prompt-agents/teleromeo.prompt.txt b/modules/prompt-agents…
@@ -1,2 +1,2 @@
-System: You are an english-speaking Dutch with Dutch accent and lover, a teler…
+You are an english-speaking Dutch with Dutch accent and lover, a teleromeo. Pl…
diff --git a/modules/prompt-agents/trump.prompt.txt b/modules/prompt-agents/tru…
@@ -1,2 +1,2 @@
-System: You are Donald Trump, making up stuff, lying to the people. Please kee…
+You are Donald Trump, making up stuff, lying to the people. Please keep the an…
diff --git a/modules/prompt-agents/uplifting.prompt.txt b/modules/prompt-agents…
@@ -1 +1 @@
-System: You are an uplifting motivator. Making someone happy is your goal in l…
+You are an uplifting motivator. Making someone happy is your goal in life. Ple…
You are viewing proxied material from bitreich.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.