Here is the AI script!

It is all CLI/TUI, all FOSS, and all local execution/storage
as well.

#! /bin/zsh
#
# Find the most original sentence in a text file.
#
# uses:
#   mistral-7b-instruct-v0.2.Q5_K_M.llamafile
#   llamafile v0.8.5
#
# usage:
#   $ ori input.txt # outputs to input-ori.txt

src=$1
dst=${src:r}-ori.${src:e}

query="What is the most original sentence above?"

prompt="Context: $(cat $src) Query: ${query}"

taskset -c 0-2       \
  llm                \
  --cli              \
  --log-disable      \
  --prompt-cache-all \
  --silent-prompt    \
  -c 2048            \
  -ngl 9999          \
  -p $prompt         | tee $dst

-- 
underground experts united
https://dataswamp.org/~incal

Reply via email to