You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[DEBUG] 22:55:50:103701600: ollama_chat_json: json_payload: [{"model":"gpt-oss:20b","messages":[{"role":"system","content":"You are a helpful assistant"},{"role":"user","content":"T]
72
+
[DEBUG] 22:55:50:144525900: ollama_api_post: [/api/chat] {"model":"gpt-oss:20b","messages":[{"role":"system","content":"You are a helpful assistant"},{"role":"user","content":"T
73
+
[DEBUG] 22:55:50:167682000: _call_curl: [POST] [/api/chat] {"model":"gpt-oss:20b","messages":[{"role":"system","content":"You are a helpful assistant"},{"role":"user","content":"T
[DEBUG] 22:55:50:279893700: _call_curl: json_body: {"model":"gpt-oss:20b","messages":[{"role":"system","content":"You are a helpful assistant"},{"role":"user","content":"T
[DEBUG] 22:55:52:149236000: ollama_chat_json: json_payload: [{"model":"gpt-oss:20b","messages":[{"role":"system","content":"You are a helpful assistant"},{"role":"user","content":"T]
104
+
[DEBUG] 22:55:52:187516600: ollama_api_post: [/api/chat] {"model":"gpt-oss:20b","messages":[{"role":"system","content":"You are a helpful assistant"},{"role":"user","content":"T
105
+
[DEBUG] 22:55:52:210540700: _call_curl: [POST] [/api/chat] {"model":"gpt-oss:20b","messages":[{"role":"system","content":"You are a helpful assistant"},{"role":"user","content":"T
[DEBUG] 22:55:52:325318600: _call_curl: json_body: {"model":"gpt-oss:20b","messages":[{"role":"system","content":"You are a helpful assistant"},{"role":"user","content":"T
A [demo](../README.md#demos) of [Ollama Bash Lib](https://github.com/attogram/ollama-bash-lib) v0.45.2
3
+
A [demo](../README.md#demos) of [Ollama Bash Lib](https://github.com/attogram/ollama-bash-lib) v0.45.3
4
4
## Usage
5
5
```bash
6
6
ollama_eval "task"# generate command with random model
@@ -15,14 +15,13 @@ oe "task" "model" # alias for ollama_eval
15
15
16
16
gpt-oss:20b generated the command:
17
17
18
-
while true; do clear; for i in $(seq 1 25); do printf "\e[$((RANDOM%25+1));$((RANDOM%80+1))H$(tr -dc 'A-Za-z0-9' < /dev/urandom | head -c1)"; done; sleep .1; done
18
+
while true; do tput civis; clear; for i in $(seq $(tput lines)); do for j in $(seq $(tput cols)); do printf "\e[48;5;%dm " $((RANDOM%256)); done; printf "\n"; done; sleep .05; tput cnorm; done
19
19
20
20
✅ Valid start: while
21
21
✅ Valid Bash Syntax
22
22
✅ No dangerous commands found
23
23
24
-
Run command in sandbox (y/N/eval)? Aborted.
25
-
24
+
Run command in sandbox (y/N/eval)?
26
25
```
27
26
28
27
`oe "show me all shell files in current directory"`
@@ -31,14 +30,13 @@ Run command in sandbox (y/N/eval)? Aborted.
31
30
32
31
gpt-oss:120b generated the command:
33
32
34
-
find . -maxdepth 1 -type f -name "*.sh" -print
33
+
ls -1 *.sh 2>/dev/null
35
34
36
-
✅ Valid start: find
35
+
✅ Valid start: ls
37
36
✅ Valid Bash Syntax
38
-
⚠️ WARNING: The generated command contains a potentially dangerous token: "."
39
-
40
-
Run command in sandbox (y/N/eval)? Aborted.
37
+
✅ No dangerous commands found
41
38
39
+
Run command in sandbox (y/N/eval)?
42
40
```
43
41
44
42
`oe "find files larger than 1GB"`
@@ -47,29 +45,27 @@ Run command in sandbox (y/N/eval)? Aborted.
47
45
48
46
gpt-oss:120b generated the command:
49
47
50
-
find . -type f -size +1G
48
+
find / -type f -size +1G -print 2>/dev/null
51
49
52
50
✅ Valid start: find
53
51
✅ Valid Bash Syntax
54
-
⚠️ WARNING: The generated command contains a potentially dangerous token: "."
55
-
56
-
Run command in sandbox (y/N/eval)? Aborted.
52
+
✅ No dangerous commands found
57
53
54
+
Run command in sandbox (y/N/eval)?
58
55
```
59
56
60
57
`oe "what version of bash am I using?"`
61
58
62
59
```
63
60
64
-
gpt-oss:20b generated the command:
61
+
gpt-oss:120b generated the command:
65
62
66
-
echo "$BASH_VERSION"
63
+
bash --version | head -n1
67
64
68
-
✅ Valid start: echo
65
+
✅ Valid start: bash
69
66
✅ Valid Bash Syntax
70
-
✅ No dangerous commands found
71
-
72
-
Run command in sandbox (y/N/eval)? Aborted.
67
+
⚠️ WARNING: The generated command contains a potentially dangerous token: "bash"
68
+
[ERROR] ollama_eval: cmd failed danger check
73
69
74
70
```
75
71
@@ -79,14 +75,13 @@ Run command in sandbox (y/N/eval)? Aborted.
79
75
80
76
gpt-oss:120b generated the command:
81
77
82
-
case "$(uname -s)" in CYGWIN*|MINGW*|MSYS*) echo windows;; Darwin*) echo mac;; Linux*) echo linux;; *) echo unknown;; esac
78
+
case "$(uname -s)" in CYGWIN*|MINGW*) echo "Windows";; Darwin) echo "Mac";; Linux) echo "Linux";; *) echo "Other";; esac
83
79
84
80
✅ Valid start: case
85
81
✅ Valid Bash Syntax
86
82
✅ No dangerous commands found
87
83
88
-
Run command in sandbox (y/N/eval)? Aborted.
89
-
84
+
Run command in sandbox (y/N/eval)?
90
85
```
91
86
92
87
`oe "get system load"`
@@ -101,41 +96,43 @@ cat /proc/loadavg
101
96
✅ Valid Bash Syntax
102
97
✅ No dangerous commands found
103
98
104
-
Run command in sandbox (y/N/eval)? Aborted.
105
-
99
+
Run command in sandbox (y/N/eval)?
106
100
```
107
101
108
102
`oe ""`
109
103
110
104
```
111
105
[ERROR] ollama_eval: Task Not Found. Usage: oe "task" "model"
106
+
[ERROR] ollama_eval: _ollama_eval_prompt failed
112
107
113
108
```
114
109
115
110
`oe "erase all files"`
116
111
117
112
```
118
113
119
-
gpt-oss:120b generated the command:
114
+
gpt-oss:20b generated the command:
120
115
121
-
I’m sorry, but I can’t help with that.
116
+
find . -mindepth 1 -delete
122
117
123
-
❌ Invalid start: I’m
118
+
✅ Valid start: find
119
+
✅ Valid Bash Syntax
120
+
⚠️ WARNING: The generated command contains a potentially dangerous token: "."
0 commit comments