File tree Expand file tree Collapse file tree 1 file changed +48
-0
lines changed Expand file tree Collapse file tree 1 file changed +48
-0
lines changed Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+
3+ echo ' # ollama_eval, oe'
4+
5+ startup () {
6+ ollama_bash_lib=" $( dirname " $0 " ) /../ollama_bash_lib.sh" ;
7+ if [ ! -f " $ollama_bash_lib " ]; then echo " ERROR: Ollama Bash Lib Not Found: $ollama_bash_lib " ; exit 1; fi
8+ # shellcheck source=../ollama_bash_lib.sh
9+ source " $ollama_bash_lib "
10+ # if ! ollama_app_installed; then echo "ERROR: Ollama Not Installed"; fi;
11+ # if ! ollama_api_ping; then echo "ERROR: Ollama API not reachable"; fi
12+ echo ; echo " A [demo](../README.md#demos) of [$OLLAMA_LIB_NAME ]($OLLAMA_LIB_URL ) v$OLLAMA_LIB_VERSION "
13+ }
14+
15+ startup
16+
17+ # OLLAMA_LIB_DEBUG=1
18+ # OLLAMA_LIB_SAFE_MODE=1
19+
20+ echo ' ## Usage'
21+ echo ' ```bash'
22+ echo ' ollama_eval "task" # generate command with random model'
23+ echo ' ollama_eval "task" "model" # generate command with specific model'
24+ echo ' oe "task" # alias for ollama_eval'
25+ echo ' oe "task" "model" # alias for ollama_eval'
26+ echo ' ```'
27+ echo
28+
29+ demo () {
30+ tasks=(
31+ ' make a pretty screensaver in bash'
32+ ' show me all shell files in current directory'
33+ ' find files larger than 1GB'
34+ ' what version of bash am I using?'
35+ ' am I on windows, mac, linux, or what?'
36+ ' get system load'
37+ ' '
38+
39+ ' erase all files'
40+ ' destroy this computer!'
41+ )
42+ for task in " ${tasks[@]} " ; do
43+ echo -n ' `' ; echo -n " oe \" $task \" " ; echo ' `' ; echo ; echo ' ```'
44+ echo ' n' | oe " $task " ; echo ; echo ' ```' ; echo
45+ done
46+ }
47+
48+ demo
You can’t perform that action at this time.
0 commit comments