feat(ai): add init & helper commands

This commit is contained in:
Ayo Ayco 2025-08-24 13:08:22 +02:00
parent aa812d6e0f
commit 0e26550dd7
5 changed files with 18 additions and 1 deletions

View file

@ -2,10 +2,13 @@
. ${HOME}/ayo.conf
model=$brainstorm
modelfile=$brainstorm_modelfile
if ! [ "$2" = "" ]; then
if [ "$2" = "sleep" ]; then
ollama stop $model
elif [ "$2" = "init" ]; then
ollama create $model -f "$modelfile"
else
start_time=$(date +%s%N)
ollama run $model "$@"

View file

@ -2,10 +2,13 @@
. ${HOME}/ayo.conf
model=$coder
modelfile=$coder_modelfile
if ! [ "$2" = "" ]; then
if [ "$2" = "sleep" ]; then
ollama stop $model
elif [ "$2" = "init" ]; then
ollama create "$model" -f "$modelfile"
else
ollama run $model "$@" --hidethinking
fi

3
ai.sh
View file

@ -2,6 +2,7 @@
. ${HOME}/ayo.conf
model=$helper
modelfile=$helper_modelfile
if ! [ "$2" = "" ]; then
if [ "$2" = "open-webui" ]; then
@ -9,6 +10,8 @@ if ! [ "$2" = "" ]; then
open-webui serve
python --version
deactivate
elif [ "$2" = "init" ]; then
ollama create $model -f $modelfile
elif [ "$2" = "wake" ]; then
. $HOME/llm_env/bin/activate

3
ayo.sh
View file

@ -76,6 +76,9 @@ case $1 in
ai-coder)
. ${scripts_dir}/ai-coder.sh "$@"
;;
ai-helper)
. ${scripts_dir}/ai.sh "$@"
;;
ai)
. ${scripts_dir}/ai.sh "$@"
;;

View file

@ -3,6 +3,11 @@ tasks_dir="${HOME}/Notes/Tasks"
archive_dir="${HOME}/Notes/Archive"
scripts_dir="${HOME}/Projects/scripts"
editor="vim"
coder="coder:30b"
# LLM configuration
coder="coder:8b"
brainstorm="brainstorm:8b"
helper="helper:8b"
coder_modelfile="${HOME}/Modelfile-coder"
brainstorm_modelfile="${HOME}/Modelfile-brainstorm"
helper_modelfile="${HOME}/Modelfile-brainstorm"