remove unused ai scripts
This commit is contained in:
parent
4d0bd69534
commit
3de358e878
3 changed files with 0 additions and 61 deletions
37
ai-coder.sh
37
ai-coder.sh
|
|
@ -1,37 +0,0 @@
|
||||||
#! /bin/bash
|
|
||||||
|
|
||||||
# Load config
|
|
||||||
. ${HOME}/ayo.conf
|
|
||||||
|
|
||||||
host=$ollama_remote_host
|
|
||||||
model=$coder
|
|
||||||
modelfile=$coder_modelfile
|
|
||||||
|
|
||||||
# Initialize variables
|
|
||||||
typora_flag=false
|
|
||||||
other_args=${@:2}
|
|
||||||
|
|
||||||
# TODO: extract typora flag
|
|
||||||
|
|
||||||
if ! [ "$other_args" = "" ]; then
|
|
||||||
if [ "$2" = "init" ]; then
|
|
||||||
OLLAMA_HOST=$host ollama create $model -f $modelfile
|
|
||||||
elif [ "$2" = "sleep" ]; then
|
|
||||||
OLLAMA_HOST=$host ollama stop $model
|
|
||||||
else
|
|
||||||
# If -t flag is set, use typora to display output
|
|
||||||
if [ "$typora_flag" = true ]; then
|
|
||||||
tempfile="$(mktemp)"
|
|
||||||
OLLAMA_HOST=$host ollama run $model "$other_args" > $tempfile
|
|
||||||
typora $tempfile > /dev/null 2>/dev/null &
|
|
||||||
else
|
|
||||||
# If no -t flag, just run the command normally
|
|
||||||
OLLAMA_HOST=$host ollama run $model "$other_args" --hidethinking
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
else
|
|
||||||
OLLAMA_HOST=$host ollama run $model --hidethinking
|
|
||||||
fi
|
|
||||||
|
|
||||||
# OLLAMA_HOST=$host ollama stop $model
|
|
||||||
|
|
@ -1,18 +0,0 @@
|
||||||
#! /bin/bash
|
|
||||||
|
|
||||||
# Load config
|
|
||||||
. ${HOME}/ayo.conf
|
|
||||||
|
|
||||||
host=$ollama_remote_host
|
|
||||||
model="helper:latest"
|
|
||||||
|
|
||||||
TEMP=$(mktemp)
|
|
||||||
vim $TEMP
|
|
||||||
|
|
||||||
PROMPT="Translate everything that follows into English. Only give me the translated text in English."
|
|
||||||
|
|
||||||
OUTPUT=$(mktemp)
|
|
||||||
|
|
||||||
OLLAMA_HOST=$host ollama run $model "$PROMPT -- " < $TEMP > $OUTPUT
|
|
||||||
|
|
||||||
typora $OUTPUT
|
|
||||||
6
ayo.sh
6
ayo.sh
|
|
@ -72,12 +72,6 @@ case $1 in
|
||||||
cozy)
|
cozy)
|
||||||
. ${scripts_dir}/cozy.sh "$@"
|
. ${scripts_dir}/cozy.sh "$@"
|
||||||
;;
|
;;
|
||||||
translate)
|
|
||||||
. ${scripts_dir}/ai-translate.sh "$@"
|
|
||||||
;;
|
|
||||||
coder)
|
|
||||||
. ${scripts_dir}/ai-coder.sh "$@"
|
|
||||||
;;
|
|
||||||
ai)
|
ai)
|
||||||
. ${scripts_dir}/ai.sh "$@"
|
. ${scripts_dir}/ai.sh "$@"
|
||||||
;;
|
;;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue