From 10c7986178a33b51669a28b196e8da676647f4ec Mon Sep 17 00:00:00 2001 From: Ayo Date: Mon, 22 Sep 2025 10:34:26 +0200 Subject: [PATCH] feat: remove AI scripts --- ai-brainstorm.sh | 60 ------------------------------------------------ ai-coder.sh | 60 ------------------------------------------------ ai-search.sh | 60 ------------------------------------------------ 3 files changed, 180 deletions(-) delete mode 100755 ai-brainstorm.sh delete mode 100755 ai-coder.sh delete mode 100755 ai-search.sh diff --git a/ai-brainstorm.sh b/ai-brainstorm.sh deleted file mode 100755 index 057f8c7..0000000 --- a/ai-brainstorm.sh +++ /dev/null @@ -1,60 +0,0 @@ -# Load config -. ${HOME}/ayo.conf - -model=$brainstorm -modelfile=$brainstorm_modelfile - -host=$ollama_remote_host - -# Initialize variables -typora_flag=false -other_args="" - -# Process arguments to handle -t flag and collect other args -while [[ $# -gt 0 ]]; do - case $1 in - -t) - typora_flag=true - shift - ;; - *) - other_args="$other_args $1" - shift - ;; - esac -done - -# Set other_args to the first argument if it exists, otherwise empty string -if [[ -n "$other_args" ]]; then - # Remove leading space - other_args="${other_args# }" - - IFS=' ' read -ra args_array <<< "$other_args" - if [[ ${#args_array[@]} -gt 1 ]]; then - # Remove first element and rejoin remaining elements - other_args="${args_array[*]:1}" - else - # If there's only one argument, set other_args to empty string - other_args="" - fi -fi - -if ! [ "$other_args" = "" ]; then - if [ "$other_args" = "sleep" ]; then - OLLAMA_HOST=$host ollama stop $model - elif [ "$other_args" = "init" ]; then - OLLAMA_HOST=$host ollama create "$model" -f "$modelfile" - 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" --hidethinking > $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 diff --git a/ai-coder.sh b/ai-coder.sh deleted file mode 100755 index 96db686..0000000 --- a/ai-coder.sh +++ /dev/null @@ -1,60 +0,0 @@ -# Load config -. ${HOME}/ayo.conf - -model=$coder -modelfile=$coder_modelfile - -host=$ollama_remote_host - -# Initialize variables -typora_flag=false -other_args="" - -# Process arguments to handle -t flag and collect other args -while [[ $# -gt 0 ]]; do - case $1 in - -t) - typora_flag=true - shift - ;; - *) - other_args="$other_args $1" - shift - ;; - esac -done - -# Set other_args to the first argument if it exists, otherwise empty string -if [[ -n "$other_args" ]]; then - # Remove leading space - other_args="${other_args# }" - - IFS=' ' read -ra args_array <<< "$other_args" - if [[ ${#args_array[@]} -gt 1 ]]; then - # Remove first element and rejoin remaining elements - other_args="${args_array[*]:1}" - else - # If there's only one argument, set other_args to empty string - other_args="" - fi -fi - -if ! [ "$other_args" = "" ]; then - if [ "$other_args" = "sleep" ]; then - OLLAMA_HOST=$host ollama stop $model - elif [ "$other_args" = "init" ]; then - OLLAMA_HOST=$host ollama create "$model" -f "$modelfile" - 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" --hidethinking > $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 diff --git a/ai-search.sh b/ai-search.sh deleted file mode 100755 index 819af71..0000000 --- a/ai-search.sh +++ /dev/null @@ -1,60 +0,0 @@ -# Load config -. ${HOME}/ayo.conf - -model=$search -modelfile=$search_modelfile - -host=$ollama_remote_host - -# Initialize variables -typora_flag=false -other_args="" - -# Process arguments to handle -t flag and collect other args -while [[ $# -gt 0 ]]; do - case $1 in - -t) - typora_flag=true - shift - ;; - *) - other_args="$other_args $1" - shift - ;; - esac -done - -# Set other_args to the first argument if it exists, otherwise empty string -if [[ -n "$other_args" ]]; then - # Remove leading space - other_args="${other_args# }" - - IFS=' ' read -ra args_array <<< "$other_args" - if [[ ${#args_array[@]} -gt 1 ]]; then - # Remove first element and rejoin remaining elements - other_args="${args_array[*]:1}" - else - # If there's only one argument, set other_args to empty string - other_args="" - fi -fi - -if ! [ "$other_args" = "" ]; then - if [ "$other_args" = "sleep" ]; then - OLLAMA_HOST=$host ollama stop $model - elif [ "$other_args" = "init" ]; then - OLLAMA_HOST=$host ollama create "$model" -f "$modelfile" - 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" --hidethinking > $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