Skip to content

Commit 336cfaa

Browse files
committed
demos v0.45.11
1 parent 961fb62 commit 336cfaa

28 files changed

+2637
-1169
lines changed

demos/_is_valid_json.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# _is_valid_json
22

3-
A [demo](../README.md#demos) of [Ollama Bash Lib](https://github.com/attogram/ollama-bash-lib) v0.45.10
3+
A [demo](../README.md#demos) of [Ollama Bash Lib](https://github.com/attogram/ollama-bash-lib) v0.45.11
44

55
| test | result | return |
66
|------|--------|--------|

demos/_is_valid_model.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# _is_valid_model
22

3-
A [demo](../README.md#demos) of [Ollama Bash Lib](https://github.com/attogram/ollama-bash-lib) v0.45.10
3+
A [demo](../README.md#demos) of [Ollama Bash Lib](https://github.com/attogram/ollama-bash-lib) v0.45.11
44

55
| test | output | return | result |
66
|------|--------|--------|--------|
77
| `mistral:7b` | mistral:7b | 0 | ✅ PASS |
8-
| `` | gpt-oss:20b | 0 | ✅ PASS |
8+
| `` | gpt-oss:120b | 0 | ✅ PASS |
99
| `hf.co/user/Model-name:QUANT` | hf.co/user/Model-name:QUANT | 0 | ✅ PASS |
1010
| `abcdefghijklmnopqrstuvwxyz` | abcdefghijklmnopqrstuvwxyz | 0 | ✅ PASS |
1111
| `1234567890` | 1234567890 | 0 | ✅ PASS |

demos/about.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
# ollama_lib_about, ollama_lib_version
22

3-
A [demo](../README.md#demos) of [Ollama Bash Lib](https://github.com/attogram/ollama-bash-lib) v0.45.10
3+
A [demo](../README.md#demos) of [Ollama Bash Lib](https://github.com/attogram/ollama-bash-lib) v0.45.11
44

55
## Demo
66

77
```bash
88
ollama_lib_version
99
```
10-
0.45.10
10+
0.45.11
1111

1212
```bash
1313
ollama_lib_about
@@ -16,7 +16,7 @@ ollama_lib_about
1616
A Bash Library to interact with Ollama
1717
1818
OLLAMA_LIB_NAME : Ollama Bash Lib
19-
OLLAMA_LIB_VERSION : 0.45.10
19+
OLLAMA_LIB_VERSION : 0.45.11
2020
OLLAMA_LIB_URL : https://github.com/attogram/ollama-bash-lib
2121
OLLAMA_LIB_DISCORD : https://discord.gg/BGQJCbYVBa
2222
OLLAMA_LIB_LICENSE : MIT

demos/help.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# help via -h and --help
22

3-
A [demo](../README.md#demos) of [Ollama Bash Lib](https://github.com/attogram/ollama-bash-lib) v0.45.10
3+
A [demo](../README.md#demos) of [Ollama Bash Lib](https://github.com/attogram/ollama-bash-lib) v0.45.11
44
## Testing -h for all functions (first argument)
55

66
`ollama_api_get -h`

demos/list.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# ollama_list, ollama_list_json
22

3-
A [demo](../README.md#demos) of [Ollama Bash Lib](https://github.com/attogram/ollama-bash-lib) v0.45.10
3+
A [demo](../README.md#demos) of [Ollama Bash Lib](https://github.com/attogram/ollama-bash-lib) v0.45.11
44

55
```
66
ollama_list

demos/messages.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# ollama_messages, ollama_messages_add, ollama_messages_count
22

3-
A [demo](../README.md#demos) of [Ollama Bash Lib](https://github.com/attogram/ollama-bash-lib) v0.45.10
3+
A [demo](../README.md#demos) of [Ollama Bash Lib](https://github.com/attogram/ollama-bash-lib) v0.45.11
44
```
55
66
ollama_messages_count: 0

demos/ollama_api_get.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# ollama_api_get
22

3-
A [demo](../README.md#demos) of [Ollama Bash Lib](https://github.com/attogram/ollama-bash-lib) v0.45.10
3+
A [demo](../README.md#demos) of [Ollama Bash Lib](https://github.com/attogram/ollama-bash-lib) v0.45.11
44

55
## Setup
66

@@ -42,12 +42,12 @@ result: output: {"version":"0.0.0"}
4242
```
4343
ollama_api_get
4444
45-
[DEBUG] 15:42:18:678496000: ollama_api_get: []
46-
[DEBUG] 15:42:18:686076000: _call_curl: [GET] []
47-
[DEBUG] 15:42:18:693193000: _call_curl: OLLAMA_LIB_API: https://ollama.com
48-
[DEBUG] 15:42:18:699871000: _call_curl: Turbo Mode
49-
[DEBUG] 15:42:18:706233000: _call_curl: args: -s -N --max-time 300 -H Content-Type: application/json -w \n%{http_code} -H Authorization: Bearer [REDACTED] -X GET https://ollama.com
50-
[DEBUG] 15:42:18:915624000: ollama_api_get: success
45+
[DEBUG] 15:51:56:452977000: ollama_api_get: []
46+
[DEBUG] 15:51:56:461207000: _call_curl: [GET] []
47+
[DEBUG] 15:51:56:468995000: _call_curl: OLLAMA_LIB_API: https://ollama.com
48+
[DEBUG] 15:51:56:475943000: _call_curl: Turbo Mode
49+
[DEBUG] 15:51:56:482237000: _call_curl: args: -s -N --max-time 300 -H Content-Type: application/json -w \n%{http_code} -H Authorization: Bearer [REDACTED] -X GET https://ollama.com
50+
[DEBUG] 15:51:56:701218000: ollama_api_get: success
5151
result: lines: 394
5252
result: output:
5353
@@ -63,12 +63,12 @@ result: output:
6363
```
6464
ollama_api_get -P "/api/version"
6565
66-
[DEBUG] 15:42:18:938927000: ollama_api_get: [/api/version]
67-
[DEBUG] 15:42:18:945998000: _call_curl: [GET] [/api/version]
68-
[DEBUG] 15:42:18:952887000: _call_curl: OLLAMA_LIB_API: https://ollama.com
69-
[DEBUG] 15:42:18:959185000: _call_curl: Turbo Mode
70-
[DEBUG] 15:42:18:965375000: _call_curl: args: -s -N --max-time 300 -H Content-Type: application/json -w \n%{http_code} -H Authorization: Bearer [REDACTED] -X GET https://ollama.com/api/version
71-
[DEBUG] 15:42:19:160717000: ollama_api_get: success
66+
[DEBUG] 15:51:56:724720000: ollama_api_get: [/api/version]
67+
[DEBUG] 15:51:56:732012000: _call_curl: [GET] [/api/version]
68+
[DEBUG] 15:51:56:739123000: _call_curl: OLLAMA_LIB_API: https://ollama.com
69+
[DEBUG] 15:51:56:745903000: _call_curl: Turbo Mode
70+
[DEBUG] 15:51:56:752275000: _call_curl: args: -s -N --max-time 300 -H Content-Type: application/json -w \n%{http_code} -H Authorization: Bearer [REDACTED] -X GET https://ollama.com/api/version
71+
[DEBUG] 15:51:56:951016000: ollama_api_get: success
7272
result: lines: 1
7373
result: output: {"version":"0.0.0"}
7474
```

demos/ollama_app_vars.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# ollama_app_vars
22

3-
A [demo](../README.md#demos) of [Ollama Bash Lib](https://github.com/attogram/ollama-bash-lib) v0.45.10
3+
A [demo](../README.md#demos) of [Ollama Bash Lib](https://github.com/attogram/ollama-bash-lib) v0.45.11
44

55
```
66
OLLAMA_AUTH : # Enables authentication between the Ollama client and server

demos/ollama_chat.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# ollama_chat
22

3-
A [demo](../README.md#demos) of [Ollama Bash Lib](https://github.com/attogram/ollama-bash-lib) v0.45.10
3+
A [demo](../README.md#demos) of [Ollama Bash Lib](https://github.com/attogram/ollama-bash-lib) v0.45.11
44

55
`model="gpt-oss:120b"`
66
## Demo

demos/ollama_generate.md

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# ollama_generate
22

3-
A [demo](../README.md#demos) of [Ollama Bash Lib](https://github.com/attogram/ollama-bash-lib) v0.45.10
3+
A [demo](../README.md#demos) of [Ollama Bash Lib](https://github.com/attogram/ollama-bash-lib) v0.45.11
44

55
## Setup
66

@@ -16,10 +16,10 @@ ollama_generate -m "$model" -p "$prompt"
1616
```
1717
```
1818
#### <thinking>
19-
#### We need to comply: user asks for 3-word description. That's fine. No policy issues. Provide three words: "fluffy, twitchy, curious".
19+
#### User asks: "Describe a rabbit in 3 words". This is straightforward, no policy violation. Provide three words description. Could be "fluffy, timid, hopping". Provide answer.
2020
#### </thinking>
2121
22-
Fluffy, twitchy, curious.
22+
Fluffy, timid, hopping.
2323
```
2424

2525
## Demo Debug
@@ -29,30 +29,30 @@ Fluffy, twitchy, curious.
2929
OLLAMA_LIB_DEBUG=1 ollama_generate -m "$model" -p "$prompt"
3030
```
3131
```
32-
[DEBUG] 15:42:23:170609000: ollama_generate: [-m] [gpt-oss:120b] [-p] [Describe a rabbit in 3 words]
33-
[DEBUG] 15:42:23:180974000: ollama_generate: init: model: [] prompt: []
34-
[DEBUG] 15:42:23:185258000: ollama_generate: while getopts: OPTARG: [gpt-oss:120b] opt: [m]
35-
[DEBUG] 15:42:23:189856000: ollama_generate: while getopts: OPTARG: [Describe a rabbit in 3 words] opt: [p]
36-
[DEBUG] 15:42:23:197092000: ollama_generate: final: model: [gpt-oss:120b] prompt: [Describe a rabbit in 3 words]
37-
[DEBUG] 15:42:23:204175000: ollama_generate: checking: model: [gpt-oss:120b]
38-
[DEBUG] 15:42:23:210879000: ollama_generate: checked: model: [gpt-oss:120b]
39-
[DEBUG] 15:42:23:222205000: ollama_generate_json: [gpt-oss:120b] [Describe a rabbit in 3 words]
40-
[DEBUG] 15:42:23:234367000: ollama_generate_json: json_payload: {"model":"gpt-oss:120b","prompt":"Describe a rabbit in 3 words","stream":false,"thinking":false}
41-
[DEBUG] 15:42:23:244635000: ollama_api_post: [/api/generate] {"model":"gpt-oss:120b","prompt":"Describe a rabbit in 3 words","stream":false,"thinking":false}
42-
[DEBUG] 15:42:23:249806000: _call_curl: [POST] [/api/generate] {"model":"gpt-oss:120b","prompt":"Describe a rabbit in 3 words","stream":false,"thinking":false}
43-
[DEBUG] 15:42:23:261422000: _call_curl: OLLAMA_LIB_API: https://ollama.com
44-
[DEBUG] 15:42:23:267000000: _call_curl: Turbo Mode
45-
[DEBUG] 15:42:23:272494000: _call_curl: json_body: {"model":"gpt-oss:120b","prompt":"Describe a rabbit in 3 words","stream":false,"thinking":false}
46-
[DEBUG] 15:42:23:278072000: _call_curl: piping json_body | curl -s -N --max-time 300 -H Content-Type: application/json -w \n%{http_code} -H Authorization: Bearer [REDACTED] -X POST https://ollama.com/api/generate -d @-
47-
[DEBUG] 15:42:24:249138000: ollama_api_post: success
48-
[DEBUG] 15:42:24:259462000: ollama_generate_json: success
49-
[DEBUG] 15:42:24:281338000: ollama_generate: result: 283 bytes: {"model":"gpt-oss:120b","created_at":"2025-08-21T13:42:23.935229767Z","response":"Soft, swift, curious.","thinking":"We
50-
[DEBUG] 15:42:24:311317000: ollama_generate: thinking: off
51-
[DEBUG] 15:42:24:328823000: ollama_generate: thinking FOUND
32+
[DEBUG] 15:52:00:967140000: ollama_generate: [-m] [gpt-oss:120b] [-p] [Describe a rabbit in 3 words]
33+
[DEBUG] 15:52:00:979371000: ollama_generate: init: model: [] prompt: []
34+
[DEBUG] 15:52:00:985756000: ollama_generate: while getopts: OPTARG: [gpt-oss:120b] opt: [m]
35+
[DEBUG] 15:52:00:991722000: ollama_generate: while getopts: OPTARG: [Describe a rabbit in 3 words] opt: [p]
36+
[DEBUG] 15:52:00:997464000: ollama_generate: final: model: [gpt-oss:120b] prompt: [Describe a rabbit in 3 words]
37+
[DEBUG] 15:52:01:003128000: ollama_generate: checking: model: [gpt-oss:120b]
38+
[DEBUG] 15:52:01:008568000: ollama_generate: checked: model: [gpt-oss:120b]
39+
[DEBUG] 15:52:01:019475000: ollama_generate_json: [gpt-oss:120b] [Describe a rabbit in 3 words]
40+
[DEBUG] 15:52:01:031051000: ollama_generate_json: json_payload: {"model":"gpt-oss:120b","prompt":"Describe a rabbit in 3 words","stream":false,"thinking":false}
41+
[DEBUG] 15:52:01:039704000: ollama_api_post: [/api/generate] {"model":"gpt-oss:120b","prompt":"Describe a rabbit in 3 words","stream":false,"thinking":false}
42+
[DEBUG] 15:52:01:044401000: _call_curl: [POST] [/api/generate] {"model":"gpt-oss:120b","prompt":"Describe a rabbit in 3 words","stream":false,"thinking":false}
43+
[DEBUG] 15:52:01:054251000: _call_curl: OLLAMA_LIB_API: https://ollama.com
44+
[DEBUG] 15:52:01:058755000: _call_curl: Turbo Mode
45+
[DEBUG] 15:52:01:063265000: _call_curl: json_body: {"model":"gpt-oss:120b","prompt":"Describe a rabbit in 3 words","stream":false,"thinking":false}
46+
[DEBUG] 15:52:01:067789000: _call_curl: piping json_body | curl -s -N --max-time 300 -H Content-Type: application/json -w \n%{http_code} -H Authorization: Bearer [REDACTED] -X POST https://ollama.com/api/generate -d @-
47+
[DEBUG] 15:52:02:551345000: ollama_api_post: success
48+
[DEBUG] 15:52:02:562203000: ollama_generate_json: success
49+
[DEBUG] 15:52:02:578852000: ollama_generate: result: 356 bytes: {"model":"gpt-oss:120b","created_at":"2025-08-21T13:52:02.191378681Z","response":"Fluffy, swift, curious.","thinking":"T
50+
[DEBUG] 15:52:02:600898000: ollama_generate: thinking: off
51+
[DEBUG] 15:52:02:614478000: ollama_generate: thinking FOUND
5252
#### <thinking>
53-
#### We need to respond with three words describing a rabbit. It's fine. No policy issues.
53+
#### The user asks for a description of a rabbit in 3 words. That's permissible. Just respond with three adjectives or descriptors. No violation. Provide answer.
5454
#### </thinking>
5555
56-
Soft, swift, curious.
57-
[DEBUG] 15:42:24:345122000: ollama_generate: success
56+
Fluffy, swift, curious.
57+
[DEBUG] 15:52:02:627643000: ollama_generate: success
5858
```

0 commit comments

Comments
 (0)