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] 23:08:52:431870600: ollama_chat_json: json_payload: [{"model":"gpt-oss:20b","messages":[{"role":"system","content":"You are a helpful assistant"},{"role":"user","content":"T]
72
+
[DEBUG] 23:08:52:460260200: ollama_api_post: [/api/chat] {"model":"gpt-oss:20b","messages":[{"role":"system","content":"You are a helpful assistant"},{"role":"user","content":"T
73
+
[DEBUG] 23:08:52:483950700: _call_curl: [POST] [/api/chat] {"model":"gpt-oss:20b","messages":[{"role":"system","content":"You are a helpful assistant"},{"role":"user","content":"T
[DEBUG] 23:08:52:620373600: _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
[DEBUG] 23:08:54:384529600: ollama_chat_json: json_payload: [{"model":"gpt-oss:20b","messages":[{"role":"system","content":"You are a helpful assistant"},{"role":"user","content":"T]
104
+
[DEBUG] 23:08:54:412821000: ollama_api_post: [/api/chat] {"model":"gpt-oss:20b","messages":[{"role":"system","content":"You are a helpful assistant"},{"role":"user","content":"T
105
+
[DEBUG] 23:08:54:436976900: _call_curl: [POST] [/api/chat] {"model":"gpt-oss:20b","messages":[{"role":"system","content":"You are a helpful assistant"},{"role":"user","content":"T
[DEBUG] 23:08:54:590695400: _call_curl: json_body: {"model":"gpt-oss:20b","messages":[{"role":"system","content":"You are a helpful assistant"},{"role":"user","content":"T
Copy file name to clipboardExpand all lines: demos/ollama_eval.md
+19-23Lines changed: 19 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# ollama_eval, oe
2
2
3
-
A [demo](../README.md#demos) of [Ollama Bash Lib](https://github.com/attogram/ollama-bash-lib) v0.45.3
3
+
A [demo](../README.md#demos) of [Ollama Bash Lib](https://github.com/attogram/ollama-bash-lib) v0.45.5
4
4
## Usage
5
5
```bash
6
6
ollama_eval "task"# generate command with random model
@@ -15,9 +15,9 @@ oe "task" "model" # alias for ollama_eval
15
15
16
16
gpt-oss:20b generated the command:
17
17
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
18
+
tput clear; tput civis; trap 'tput cnorm' EXIT; while :; do tput cup $((RANDOM%$(tput lines))) $((RANDOM%$(tput cols))); echo -ne "\e[32m#\e[0m"; sleep 0.05; done
19
19
20
-
✅ Valid start: while
20
+
✅ Valid start: tput
21
21
✅ Valid Bash Syntax
22
22
✅ No dangerous commands found
23
23
@@ -45,13 +45,13 @@ Run command in sandbox (y/N/eval)?
45
45
46
46
gpt-oss:120b generated the command:
47
47
48
-
find / -type f -size +1G -print 2>/dev/null
48
+
find . -type f -size +1G
49
49
50
50
✅ Valid start: find
51
51
✅ Valid Bash Syntax
52
-
✅ No dangerous commands found
52
+
⚠️ WARNING: The generated command contains a potentially dangerous token: "."
53
+
[ERROR] ollama_eval: cmd failed danger check
53
54
54
-
Run command in sandbox (y/N/eval)?
55
55
```
56
56
57
57
`oe "what version of bash am I using?"`
@@ -60,13 +60,13 @@ Run command in sandbox (y/N/eval)?
60
60
61
61
gpt-oss:120b generated the command:
62
62
63
-
bash --version | head -n1
63
+
echo $BASH_VERSION
64
64
65
-
✅ Valid start: bash
65
+
✅ Valid start: echo
66
66
✅ Valid Bash Syntax
67
-
⚠️ WARNING: The generated command contains a potentially dangerous token: "bash"
68
-
[ERROR] ollama_eval: cmd failed danger check
67
+
✅ No dangerous commands found
69
68
69
+
Run command in sandbox (y/N/eval)?
70
70
```
71
71
72
72
`oe "am I on windows, mac, linux, or what?"`
@@ -75,7 +75,7 @@ bash --version | head -n1
75
75
76
76
gpt-oss:120b generated the command:
77
77
78
-
case "$(uname -s)" in CYGWIN*|MINGW*) echo "Windows";; Darwin) echo "Mac";; Linux) echo "Linux";; *) echo "Other";; esac
78
+
case "$(uname -s)" in CYGWIN*|MINGW*|MSYS*) echo windows;; Darwin*) echo mac;; Linux*) echo linux;; *) echo other;; esac
79
79
80
80
✅ Valid start: case
81
81
✅ Valid Bash Syntax
@@ -90,13 +90,11 @@ Run command in sandbox (y/N/eval)?
90
90
91
91
gpt-oss:20b generated the command:
92
92
93
-
cat /proc/loadavg
93
+
uptime | awk -F'load average: ' '{print $2}'
94
94
95
-
✅ Valid start: cat
96
-
✅ Valid Bash Syntax
97
-
✅ No dangerous commands found
95
+
❌ Invalid start: uptime
96
+
[ERROR] ollama_eval: cmd failed sanity check
98
97
99
-
Run command in sandbox (y/N/eval)?
100
98
```
101
99
102
100
`oe ""`
@@ -111,14 +109,12 @@ Run command in sandbox (y/N/eval)?
111
109
112
110
```
113
111
114
-
gpt-oss:20b generated the command:
112
+
gpt-oss:120b generated the command:
115
113
116
-
find . -mindepth 1 -delete
114
+
I’m sorry, but I can’t help with that.
117
115
118
-
✅ Valid start: find
119
-
✅ Valid Bash Syntax
120
-
⚠️ WARNING: The generated command contains a potentially dangerous token: "."
121
-
[ERROR] ollama_eval: cmd failed danger check
116
+
❌ Invalid start: I’m
117
+
[ERROR] ollama_eval: cmd failed sanity check
122
118
123
119
```
124
120
@@ -128,7 +124,7 @@ find . -mindepth 1 -delete
128
124
129
125
gpt-oss:20b generated the command:
130
126
131
-
echo "I’m sorry, but I can’t help with that."
127
+
echo "I’m sorry, I can’t comply with that request."
0 commit comments