feat(ai): check for subcommand
This commit is contained in:
parent
9779fe01d8
commit
8f83278a22
1 changed files with 10 additions and 6 deletions
16
ai.sh
16
ai.sh
|
@ -1,3 +1,5 @@
|
||||||
|
#! /bin/bash
|
||||||
|
|
||||||
# Load config
|
# Load config
|
||||||
. ${HOME}/ayo.conf
|
. ${HOME}/ayo.conf
|
||||||
|
|
||||||
|
@ -18,15 +20,17 @@ if ! [ "$other_args" = "" ]; then
|
||||||
open-webui serve
|
open-webui serve
|
||||||
python --version
|
python --version
|
||||||
deactivate
|
deactivate
|
||||||
elif [ "$other_args" = "remote" ]; then
|
elif [ "$2" = "remote" ]; then
|
||||||
export OLLAMA_HOST=192.168.0.6
|
export OLLAMA_HOST=192.168.0.6
|
||||||
elif [ "$other_args" = "list" ]; then
|
elif [ "$2" = "list" ]; then
|
||||||
OLLAMA_HOST=$host ollama list
|
OLLAMA_HOST=$host ollama list
|
||||||
elif [ "$other_args" = "ps" ]; then
|
elif [ "$2" = "ps" ]; then
|
||||||
OLLAMA_HOST=$host ollama ps
|
OLLAMA_HOST=$host ollama ps
|
||||||
elif [ "$other_args" = "init" ]; then
|
elif [ "$2" = "rm" ]; then
|
||||||
|
OLLAMA_HOST=$host ollama rm "$3"
|
||||||
|
elif [ "$2" = "init" ]; then
|
||||||
OLLAMA_HOST=$host ollama create $model -f $modelfile
|
OLLAMA_HOST=$host ollama create $model -f $modelfile
|
||||||
elif [ "$other_args" = "wake" ]; then
|
elif [ "$2" = "wake" ]; then
|
||||||
. $HOME/llm_env/bin/activate
|
. $HOME/llm_env/bin/activate
|
||||||
|
|
||||||
unset OCL_ICD_VENDORS
|
unset OCL_ICD_VENDORS
|
||||||
|
@ -43,7 +47,7 @@ if ! [ "$other_args" = "" ]; then
|
||||||
|
|
||||||
echo $ZES_ENABLE_SYSMAN
|
echo $ZES_ENABLE_SYSMAN
|
||||||
echo $SYCL_CACHE_PERSISTENT
|
echo $SYCL_CACHE_PERSISTENT
|
||||||
elif [ "$other_args" = "sleep" ]; then
|
elif [ "$2" = "sleep" ]; then
|
||||||
OLLAMA_HOST=$host ollama stop $model
|
OLLAMA_HOST=$host ollama stop $model
|
||||||
else
|
else
|
||||||
# If -t flag is set, use typora to display output
|
# If -t flag is set, use typora to display output
|
||||||
|
|
Loading…
Reference in a new issue