feat(ai): add init & helper commands
This commit is contained in:
parent
aa812d6e0f
commit
0e26550dd7
5 changed files with 18 additions and 1 deletions
|
@ -2,10 +2,13 @@
|
||||||
. ${HOME}/ayo.conf
|
. ${HOME}/ayo.conf
|
||||||
|
|
||||||
model=$brainstorm
|
model=$brainstorm
|
||||||
|
modelfile=$brainstorm_modelfile
|
||||||
|
|
||||||
if ! [ "$2" = "" ]; then
|
if ! [ "$2" = "" ]; then
|
||||||
if [ "$2" = "sleep" ]; then
|
if [ "$2" = "sleep" ]; then
|
||||||
ollama stop $model
|
ollama stop $model
|
||||||
|
elif [ "$2" = "init" ]; then
|
||||||
|
ollama create $model -f "$modelfile"
|
||||||
else
|
else
|
||||||
start_time=$(date +%s%N)
|
start_time=$(date +%s%N)
|
||||||
ollama run $model "$@"
|
ollama run $model "$@"
|
||||||
|
|
|
@ -2,10 +2,13 @@
|
||||||
. ${HOME}/ayo.conf
|
. ${HOME}/ayo.conf
|
||||||
|
|
||||||
model=$coder
|
model=$coder
|
||||||
|
modelfile=$coder_modelfile
|
||||||
|
|
||||||
if ! [ "$2" = "" ]; then
|
if ! [ "$2" = "" ]; then
|
||||||
if [ "$2" = "sleep" ]; then
|
if [ "$2" = "sleep" ]; then
|
||||||
ollama stop $model
|
ollama stop $model
|
||||||
|
elif [ "$2" = "init" ]; then
|
||||||
|
ollama create "$model" -f "$modelfile"
|
||||||
else
|
else
|
||||||
ollama run $model "$@" --hidethinking
|
ollama run $model "$@" --hidethinking
|
||||||
fi
|
fi
|
||||||
|
|
3
ai.sh
3
ai.sh
|
@ -2,6 +2,7 @@
|
||||||
. ${HOME}/ayo.conf
|
. ${HOME}/ayo.conf
|
||||||
|
|
||||||
model=$helper
|
model=$helper
|
||||||
|
modelfile=$helper_modelfile
|
||||||
|
|
||||||
if ! [ "$2" = "" ]; then
|
if ! [ "$2" = "" ]; then
|
||||||
if [ "$2" = "open-webui" ]; then
|
if [ "$2" = "open-webui" ]; then
|
||||||
|
@ -9,6 +10,8 @@ if ! [ "$2" = "" ]; then
|
||||||
open-webui serve
|
open-webui serve
|
||||||
python --version
|
python --version
|
||||||
deactivate
|
deactivate
|
||||||
|
elif [ "$2" = "init" ]; then
|
||||||
|
ollama create $model -f $modelfile
|
||||||
elif [ "$2" = "wake" ]; then
|
elif [ "$2" = "wake" ]; then
|
||||||
. $HOME/llm_env/bin/activate
|
. $HOME/llm_env/bin/activate
|
||||||
|
|
||||||
|
|
3
ayo.sh
3
ayo.sh
|
@ -76,6 +76,9 @@ case $1 in
|
||||||
ai-coder)
|
ai-coder)
|
||||||
. ${scripts_dir}/ai-coder.sh "$@"
|
. ${scripts_dir}/ai-coder.sh "$@"
|
||||||
;;
|
;;
|
||||||
|
ai-helper)
|
||||||
|
. ${scripts_dir}/ai.sh "$@"
|
||||||
|
;;
|
||||||
ai)
|
ai)
|
||||||
. ${scripts_dir}/ai.sh "$@"
|
. ${scripts_dir}/ai.sh "$@"
|
||||||
;;
|
;;
|
||||||
|
|
|
@ -3,6 +3,11 @@ tasks_dir="${HOME}/Notes/Tasks"
|
||||||
archive_dir="${HOME}/Notes/Archive"
|
archive_dir="${HOME}/Notes/Archive"
|
||||||
scripts_dir="${HOME}/Projects/scripts"
|
scripts_dir="${HOME}/Projects/scripts"
|
||||||
editor="vim"
|
editor="vim"
|
||||||
coder="coder:30b"
|
|
||||||
|
# LLM configuration
|
||||||
|
coder="coder:8b"
|
||||||
brainstorm="brainstorm:8b"
|
brainstorm="brainstorm:8b"
|
||||||
helper="helper:8b"
|
helper="helper:8b"
|
||||||
|
coder_modelfile="${HOME}/Modelfile-coder"
|
||||||
|
brainstorm_modelfile="${HOME}/Modelfile-brainstorm"
|
||||||
|
helper_modelfile="${HOME}/Modelfile-brainstorm"
|
||||||
|
|
Loading…
Reference in a new issue