Remove randomly generated quotes from gpt output. - 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 550995e4ad9a69983cb372f2b642f0f3ca18d3a0 DIR parent a7d94c7347a76f6c22b1e7996185f30bc288de69 HTML Author: Annna Robert-Houdin <annna@bitreich.org> Date: Mon, 28 Jul 2025 17:18:44 +0200 Remove randomly generated quotes from gpt output. Diffstat: M gpt | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) --- DIR diff --git a/gpt b/gpt @@ -27,13 +27,15 @@ function local_llama() { | $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' + | sed -E '/^$/d;s/^>[[:blank:]]+//;q' \ + | sed -e 's/^"//;s/"$//;' 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' + | sed -E '/^$/d;s/^>[[:blank:]]+//;q' \ + | sed -e 's/^"//;s/"$//;' fi #$ggmlbin -m $ggmlmodel -n $ggmlntokens \ # --simple-io --no-display-prompt --grammar 'root ::= ([^\x00-\x1F])*' \ @@ -54,7 +56,8 @@ function remote_llama() { --nowordwrap \ llama3:8b \ "${prompt}" \ - | head -n 1 + | head -n 1 \ + | sed -e 's/^"//;s/"$//;' else printf "%s\n" "${prompt}" \ | ollama-gpu \ @@ -63,7 +66,8 @@ function remote_llama() { --nowordwrap \ llama3:8b \ "${prompt}" \ - | head -n 1 + | head -n 1 \ + | sed -e 's/^"//;s/"$//;' fi }