NPCvector/gabgod
type-two 07a0db6b61 NPCvector v1: pgvector corpus → original NPC voice lines (GABGOD)
Distill pattern: embedded forum corpus (style reference only, never shipped
verbatim) → persona line banks with human review gate → SFT export for LoRA.
First deployment: PROCITY shopkeepers from Soulstrut/VGplus on ultra.
Includes the abliterated writer toggle and the earned-gotchas writeup.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-18 21:19:31 +10:00

32 lines
1.7 KiB
Bash
Executable File

#!/bin/bash
# GABGOD CLI — corpus->NPC-line forge. Run from anywhere; lives in ~/Documents/GABGOD.
cd "$(dirname "$0")"
PSQL=/opt/homebrew/opt/postgresql@16/bin/psql
case "$1" in
abliterated) # admin toggle: gabgod abliterated on|off|status
case "$2" in
on) /opt/homebrew/bin/python3 - <<'EOF'
import json; p="config.json"; c=json.load(open(p)); c["writer"]["abliterated"]=True
json.dump(c, open(p,"w"), indent=2); print("abliterated: ON ->", c["writer"]["abliterix"]["model"])
EOF
;;
off) /opt/homebrew/bin/python3 - <<'EOF'
import json; p="config.json"; c=json.load(open(p)); c["writer"]["abliterated"]=False
json.dump(c, open(p,"w"), indent=2); print("abliterated: OFF ->", c["writer"]["stock"]["model"])
EOF
;;
*) /opt/homebrew/bin/python3 -c "
import json; c=json.load(open('config.json'))['writer']
m = c['abliterix'] if c['abliterated'] else c['stock']
print('abliterated:', 'ON' if c['abliterated'] else 'OFF', '->', m['model'], '@', m['url'])" ;;
esac ;;
distill) shift; ./distill.py "$@" ;;
status) cat ~/.jobs/gabgod-distill.status 2>/dev/null || echo "no job run yet" ;;
sample) # gabgod sample [persona] — random unreviewed lines
W=""; [ -n "$2" ] && W="where persona='$2'"
$PSQL -d discogs_full -c "select persona, situation, line from gabgod.line_bank $W order by random() limit 15" ;;
counts) $PSQL -d discogs_full -c "select persona, count(*) lines, count(*) filter (where approved) approved from gabgod.line_bank group by persona order by 1" ;;
export) shift; ./export_sft.py "$@" ;;
*) echo "usage: gabgod {abliterated on|off|status} | distill [...] | status | sample [persona] | counts | export [--all]" ;;
esac