| Remove randomly generated quotes from gpt output. - annna - Annna the nice frie… | |
| git clone git://bitreich.org/annna/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws6… | |
| Log | |
| Files | |
| Refs | |
| Tags | |
| README | |
| --- | |
| commit 550995e4ad9a69983cb372f2b642f0f3ca18d3a0 | |
| parent a7d94c7347a76f6c22b1e7996185f30bc288de69 | |
| Author: Annna Robert-Houdin <[email protected]> | |
| 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(-) | |
| --- | |
| 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 … | |
| -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 … | |
| -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-\… | |
| @@ -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 | |
| } | |