Commit Diff


commit - bdb5c09d1ad64dcf8a2db0266ae04f4b065defc2
commit + 50b8881ac6247a8b6b1a18132f0a86b649835b97
blob - /dev/null
blob + e126b97ec70b2b9effc608ede47e1c32cf388230 (mode 755)
--- /dev/null
+++ bin/confl
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+auth=`sed 1q $home/.config/atlassian/basicauth`
+
+usage='usage: confl url'
+
+if test $# -eq 1
+then
+	echo $usage
+	exit 1
+fi
+
+dir=`dirname $1`
+id=`basename $dir`
+
+host=`echo $1 | sed 's!^https?://!!' | awk -F / '{print $1}'`
+
+url=https://$host/wiki/rest/api/content/$id?expand=body.view
+
+curl -s -u $auth $url | jq -r .body.view.value
blob - /dev/null
blob + 022a353e8b610cf23c0d37bb21c70ade78e0ef9e (mode 755)
--- /dev/null
+++ bin/precis
@@ -0,0 +1,30 @@
+#!/bin/sh
+
+# https://www.llama.com/docs/model-cards-and-prompt-formats/llama3_2
+
+sys='<|start_header_id|>system<|end_header_id|>
+You summarise text provided by the user. Reply only with the summary text.<|eot_id|>
+<|start_header_id|>user<|end_header_id|>'
+
+tmp=`mktemp`
+echo "$sys" > $tmp
+cat >> $tmp
+echo '<|eot_id|>' >> $tmp
+echo -n '<|start_header_id|>assistant<|end_header_id|>' >> $tmp
+
+usage="usage: precis [model]"
+if test $# -gt 1
+then
+	echo $usage
+	exit 2
+fi
+
+model=$HOME/llama-3.2-3b-instruct-q4_k_m.gguf
+if test $1 != ""
+then
+	model=$1
+fi
+
+llama-cli -m  --no-display-prompt -c 8192 -f $tmp 2>/dev/null
+
+rm $tmp