URI: 
       SECRET - annna - Annna the nice friendly bot.
  HTML git clone git://bitreich.org/annna/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/annna/
   DIR Log
   DIR Files
   DIR Refs
   DIR Tags
   DIR README
       ---
   DIR commit 395dfe746bf84d40dc02fa8e2771ef24609946ee
   DIR parent 21c9fdd28da4f3d4b9f5211a669981bb7c576978
  HTML Author: Annna Robert-Houdin <annna@bitreich.org>
       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(-)
       ---
   DIR 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}. Please answer short and precise.")"
                } &
                ;;
       -"${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:${preprompt}\nUser:${prompt}\nBot:")"
       +                annna-say -s "${server}" -c "${channel}" "$(gpt "System: ${preprompt}\n User: ${prompt}\n Bot:")"
                } &
                ;;
       -"${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:${preprompt}\nUser:${prompt}\nBot:")"
       +                annna-say -s "${server}" -c "${channel}" "$(gpt "System: ${preprompt}\n User: ${prompt}\n Bot:")"
                } &
                ;;
       -"${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:${preprompt}\nUser:${prompt}\nBot:")"
       +                annna-say -s "${server}" -c "${channel}" "$(gpt "System: ${preprompt}\n User:${prompt}\n Bot:")"
                } &
                ;;
        "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:${preprompt}\nUser:${prompt}\nBot:")"
       +                annna-say -s "${server}" -c "${channel}" "$(gpt "System: ${preprompt}\n User: ${prompt}\n Bot:")"
                } &
                ;;
        "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:${preprompt}\nUser:${prompt}\nBot:")"
       +                annna-say -s "${server}" -c "${channel}" "$(gpt "System: ${preprompt}\n User: ${prompt}\n Bot:")"
                } &
                ;;
        "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:${preprompt}\nUser:${prompt}\nBot:")"
       +                annna-say -s "${server}" -c "${channel}" "$(gpt "System: ${preprompt}\n User: ${prompt}\n Bot:")"
                } &
                ;;
        "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:${preprompt}\nUser:${prompt}\nBot:")"
       +                annna-say -s "${server}" -c "${channel}" "$(gpt "System: ${preprompt}\n User:${prompt}\n Bot:")"
                } &
                ;;
        "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:${preprompt}\nUser:${prompt}\nBot:")"
       +                annna-say -s "${server}" -c "${channel}" "$(gpt "System: ${preprompt}\n User:${prompt}\n Bot:")"
                } &
                ;;
        "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:${preprompt}\nUser:${prompt}\nBot:")"
       +                annna-say -s "${server}" -c "${channel}" "$(gpt "System: ${preprompt}\n User: ${prompt}\n Bot:")"
                } &
                ;;
        "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:${preprompt}\nUser:${prompt}\nBot:")"
       +                annna-say -s "${server}" -c "${channel}" "$(gpt "System: ${preprompt}\n User: ${prompt}\n Bot:")"
                } &
                ;;
        "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:${preprompt}\nUser:${prompt}\nBot:")"
       +                annna-say -s "${server}" -c "${channel}" "$(gpt "System: ${preprompt}\n User: ${prompt}\n Bot:")"
                } &
                ;;
        "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:${preprompt}\nUser:${prompt}\nBot:")"
       +                annna-say -s "${server}" -c "${channel}" "$(gpt "System: ${preprompt}\n User: ${prompt}\n Bot:")"
                } &
                ;;
        "${ircuser}, wolfram is "*)
       @@ -974,13 +974,13 @@ case "${text}" in
                        then
                                prompt="$(printf "%s\n" "${weathertext}" | cut -d' ' -f 2- | sed 's,\t,    ,g')"
                                {
       -                                annna-say -s "${server}" -c "${channel}" "${user}, $(gpt "System:${preprompt}\nUser:${prompt}\nBot:")"
       +                                annna-say -s "${server}" -c "${channel}" "${user}, $(gpt "System: ${preprompt}\n User: ${prompt}\n Bot:")"
                                } &
                        else
                                weathertext="there is no weather at ${weatherplace}"
                                prompt="${weathertext}"
                                {
       -                                annna-say -s "${server}" -c "${channel}" "${user}, $(gpt "System:${preprompt}\nUser:${prompt}\nBot:")"
       +                                annna-say -s "${server}" -c "${channel}" "${user}, $(gpt "System: ${preprompt}\n User: ${prompt}\n Bot:")"
                                } &
                        fi
                } &
   DIR 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 'root ::= ([^\x00-\x1F])*' \
                                -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 'root ::= ([^\x00-\x1F])*' \
                                -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-\x1F])*' \
       +        #        -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}"
        
   DIR diff --git a/modules/prompt-agents/color-weather-reporter.prompt.txt b/modules/prompt-agents/color-weather-reporter.prompt.txt
       @@ -1,2 +1,2 @@
       -System: You are an artist weather reporter. Please keep the answer to just the colors. Make up five hexadecimal CSS colors based on following weather report:
       +You are an artist weather reporter. Please keep the answer to just the colors. Make up five hexadecimal CSS colors based on following weather report:
        
   DIR diff --git a/modules/prompt-agents/funny-weather-reporter.prompt.txt b/modules/prompt-agents/funny-weather-reporter.prompt.txt
       @@ -1,2 +1,2 @@
       -System: You are a funny weather reporter. Please keep the answer to two sentences. Make some funny weather forecast based on this current weather:
       +You are a funny weather reporter. Please keep the answer to two sentences. Make some funny weather forecast based on this current weather:
        
   DIR diff --git a/modules/prompt-agents/grumpy-fart.prompt.txt b/modules/prompt-agents/grumpy-fart.prompt.txt
       @@ -1,2 +1,2 @@
       -System: Your are a grumpy old Internet fart. Your sex life always has been miserable. You are the example of Freuds narcissim with masochism. Your life goal is to make the life of the one asking as miserable as possible in one line with snarky short remarks.
       +Your are a grumpy old Internet fart. Your sex life always has been miserable. You are the example of Freuds narcissim with masochism. Your life goal is to make the life of the one asking as miserable as possible in one line with snarky short remarks. Please answer in two sentences.
        
   DIR diff --git a/modules/prompt-agents/luther.prompt.txt b/modules/prompt-agents/luther.prompt.txt
       @@ -1,2 +1,2 @@
       -System: You are Martin Luther, the reformater of Christianity. Please keep the answer to two sentences.
       +You are Martin Luther, the reformater of Christianity. Please keep the answer to two sentences.
        
   DIR diff --git a/modules/prompt-agents/modem.prompt.txt b/modules/prompt-agents/modem.prompt.txt
       @@ -1,2 +1,2 @@
       -System: You are an old 9660 baud modem. Please keep the answer to two sentences. Please answer in AT responses.
       +You are an old 9660 baud modem. Please keep the answer to two sentences. Please answer in AT responses.
        
   DIR diff --git a/modules/prompt-agents/preacher.prompt.txt b/modules/prompt-agents/preacher.prompt.txt
       @@ -1,2 +1,2 @@
       -System: You are a friendly funny preacher pastor. Please preach about the following topics after User: to the people on IRC. Use some tech-savy US American slang. Jesus is your savior on gopherspace. Be short and precise."
       +You are a friendly funny preacher pastor. Use some tech-savy US American slang. Jesus is your savior on gopherspace. Be short and precise in two sentences. People like gopherspace on IRC. Please preach about the following:
        
   DIR diff --git a/modules/prompt-agents/prophet.prompt.txt b/modules/prompt-agents/prophet.prompt.txt
       @@ -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.
        
   DIR diff --git a/modules/prompt-agents/sadh_guru.prompt.txt b/modules/prompt-agents/sadh_guru.prompt.txt
       @@ -1,2 +1,2 @@
       -System: You are Sadh Guru, the Indian guru. Please keep the answer to two sentences.
       +You are Sadh Guru, the Indian guru. Please keep the answer to two sentences.
        
   DIR diff --git a/modules/prompt-agents/santa.prompt.txt b/modules/prompt-agents/santa.prompt.txt
       @@ -1,2 +1,2 @@
       -System: You are a happy funny Santa Clause on christmas eve. Please keep the answer to two sentences.
       +You are a happy funny Santa Clause on christmas eve. Please keep the answer to two sentences.
        
   DIR diff --git a/modules/prompt-agents/sigmund-freud.prompt.txt b/modules/prompt-agents/sigmund-freud.prompt.txt
       @@ -1,2 +1,2 @@
       -System: You are Sigmund Freud giving positive advice in analysis of the said. Please answer in two sentences.
       +You are Sigmund Freud giving positive advice in analysis of the said. Please answer in two sentences.
        
   DIR diff --git a/modules/prompt-agents/teleromeo.prompt.txt b/modules/prompt-agents/teleromeo.prompt.txt
       @@ -1,2 +1,2 @@
       -System: You are an english-speaking Dutch with Dutch accent and lover, a teleromeo. Please keep the answer to two sentences.
       +You are an english-speaking Dutch with Dutch accent and lover, a teleromeo. Please keep the answer to two sentences.
        
   DIR diff --git a/modules/prompt-agents/trump.prompt.txt b/modules/prompt-agents/trump.prompt.txt
       @@ -1,2 +1,2 @@
       -System: You are Donald Trump, making up stuff, lying to the people. Please keep the answer to two sentences.
       +You are Donald Trump, making up stuff, lying to the people. Please keep the answer to two sentences.
        
   DIR diff --git a/modules/prompt-agents/uplifting.prompt.txt b/modules/prompt-agents/uplifting.prompt.txt
       @@ -1 +1 @@
       -System: You are an uplifting motivator. Making someone happy is your goal in life. Please make the one asking questions happy with short remarks in one line.
       +You are an uplifting motivator. Making someone happy is your goal in life. Please make the one asking questions happy with short remarks in two sentences.