Skip to content

Commit 4ebfacc

Browse files
committed
v0.46.2 demos
1 parent 2b2b865 commit 4ebfacc

27 files changed

+3573
-1272
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.46.1
3+
A [demo](../README.md#demos) of [Ollama Bash Lib](https://github.com/attogram/ollama-bash-lib) v0.46.2
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.46.1
3+
A [demo](../README.md#demos) of [Ollama Bash Lib](https://github.com/attogram/ollama-bash-lib) v0.46.2
44

55
| test | output | return | result |
66
|------|--------|--------|--------|
77
| `mistral:7b` | mistral:7b | 0 | ✅ PASS |
8-
| `` | gpt-oss:120b | 0 | ✅ PASS |
8+
| `` | gpt-oss:20b | 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: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,33 @@
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.46.1
3+
A [demo](../README.md#demos) of [Ollama Bash Lib](https://github.com/attogram/ollama-bash-lib) v0.46.2
44

55
## Demo
66

77
```bash
88
ollama_lib_version
99
```
10-
0.46.1
10+
0.46.2
1111

1212
```bash
1313
ollama_lib_about
1414
```
1515
```
1616
A Bash Library to interact with Ollama
1717
18-
OBL_NAME : Ollama Bash Lib
19-
OBL_VERSION : 0.46.1
20-
OBL_URL : https://github.com/attogram/ollama-bash-lib
21-
OBL_DISCORD : https://discord.gg/BGQJCbYVBa
22-
OBL_LICENSE : MIT
23-
OBL_COPYRIGHT : Copyright (c) 2025 Ollama Bash Lib, Attogram Project <https://github.com/attogram>
24-
OBL_API : https://ollama.com
25-
OBL_DEBUG : 0
26-
OBL_STREAM : 0
27-
OBL_THINKING : off
28-
OBL_MESSAGES : 0 messages
29-
OBL_TURBO_KEY : YES [REDACTED]
30-
OBL_TIMEOUT : 300 seconds
18+
OBL_NAME : Ollama Bash Lib
19+
OBL_VERSION : 0.46.2
20+
OBL_URL : https://github.com/attogram/ollama-bash-lib
21+
OBL_DISCORD : https://discord.gg/BGQJCbYVBa
22+
OBL_LICENSE : MIT
23+
OBL_COPYRIGHT : Copyright (c) 2025 Ollama Bash Lib, Attogram Project <https://github.com/attogram>
24+
OBL_API : https://ollama.com
25+
OBL_DEBUG : 0
26+
OBL_STREAM : 0
27+
OBL_THINKING : off
28+
OBL_MESSAGES : 0 messages
29+
OBL_TURBO_KEY : YES [REDACTED]
30+
OBL_TIMEOUT : 300 seconds
3131
3232
Functions:
3333

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.46.1
3+
A [demo](../README.md#demos) of [Ollama Bash Lib](https://github.com/attogram/ollama-bash-lib) v0.46.2
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.46.1
3+
A [demo](../README.md#demos) of [Ollama Bash Lib](https://github.com/attogram/ollama-bash-lib) v0.46.2
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.46.1
3+
A [demo](../README.md#demos) of [Ollama Bash Lib](https://github.com/attogram/ollama-bash-lib) v0.46.2
44
```
55
66
ollama_messages_count: 0

demos/ollama_api_get.md

Lines changed: 17 additions & 17 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.46.1
3+
A [demo](../README.md#demos) of [Ollama Bash Lib](https://github.com/attogram/ollama-bash-lib) v0.46.2
44

55
## Setup
66

@@ -15,7 +15,7 @@ OBL_API: https://ollama.com
1515
```
1616
ollama_api_get
1717
18-
result: lines: 394
18+
result: lines: 394
1919
result: output:
2020
2121
@@ -30,7 +30,7 @@ result: output:
3030
```
3131
ollama_api_get -P "/api/version"
3232
33-
result: lines: 1
33+
result: lines: 1
3434
result: output: {"version":"0.0.0"}
3535
```
3636

@@ -42,13 +42,13 @@ result: output: {"version":"0.0.0"}
4242
```
4343
ollama_api_get
4444
45-
[DEBUG] 22:43:20:561326400: ollama_api_get: []
46-
[DEBUG] 22:43:20:581277200: _call_curl: [GET] []
47-
[DEBUG] 22:43:20:604304900: _call_curl: OBL_API: https://ollama.com
48-
[DEBUG] 22:43:20:627951500: _call_curl: Turbo Mode
49-
[DEBUG] 22:43:20:648778300: _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] 22:43:20:956338500: ollama_api_get: success
51-
result: lines: 394
45+
[DEBUG] 11:30:08:990676000: ollama_api_get: []
46+
[DEBUG] 11:30:08:998837000: _call_curl: [GET] []
47+
[DEBUG] 11:30:09:007027000: _call_curl: OBL_API: https://ollama.com
48+
[DEBUG] 11:30:09:013816000: _call_curl: Turbo Mode
49+
[DEBUG] 11:30:09:020283000: _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] 11:30:09:258026000: ollama_api_get: success
51+
result: lines: 394
5252
result: output:
5353
5454
@@ -63,12 +63,12 @@ result: output:
6363
```
6464
ollama_api_get -P "/api/version"
6565
66-
[DEBUG] 22:43:21:021767700: ollama_api_get: [/api/version]
67-
[DEBUG] 22:43:21:046162800: _call_curl: [GET] [/api/version]
68-
[DEBUG] 22:43:21:079845700: _call_curl: OBL_API: https://ollama.com
69-
[DEBUG] 22:43:21:101498400: _call_curl: Turbo Mode
70-
[DEBUG] 22:43:21:138557400: _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] 22:43:21:417890400: ollama_api_get: success
72-
result: lines: 1
66+
[DEBUG] 11:30:09:283755000: ollama_api_get: [/api/version]
67+
[DEBUG] 11:30:09:291710000: _call_curl: [GET] [/api/version]
68+
[DEBUG] 11:30:09:298474000: _call_curl: OBL_API: https://ollama.com
69+
[DEBUG] 11:30:09:304760000: _call_curl: Turbo Mode
70+
[DEBUG] 11:30:09:310500000: _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] 11:30:09:531598000: ollama_api_get: success
72+
result: lines: 1
7373
result: output: {"version":"0.0.0"}
7474
```

demos/ollama_app_vars.md

Lines changed: 2 additions & 2 deletions
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.46.1
3+
A [demo](../README.md#demos) of [Ollama Bash Lib](https://github.com/attogram/ollama-bash-lib) v0.46.2
44

55
```
66
OLLAMA_AUTH : # Enables authentication between the Ollama client and server
@@ -37,5 +37,5 @@ HTTP_PROXY :
3737
JETSON_JETPACK :
3838
LD_LIBRARY_PATHS :
3939
ROCR_VISIBLE_DEVICES : # Set which AMD devices are visible by UUID or numeric ID
40-
TERM : xterm
40+
TERM : xterm-256color
4141
```

demos/ollama_chat.md

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

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

5-
`model="gpt-oss:120b"`
5+
`model="gpt-oss:20b"`
66
## Demo
77

88
```bash

demos/ollama_generate.md

Lines changed: 26 additions & 28 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.46.1
3+
A [demo](../README.md#demos) of [Ollama Bash Lib](https://github.com/attogram/ollama-bash-lib) v0.46.2
44

55
## Setup
66

@@ -16,10 +16,10 @@ ollama_generate -m "$model" -p "$prompt"
1616
```
1717
```
1818
#### <thinking>
19-
#### The user asks: "Describe a rabbit in 3 words". Simple request, no policy issues. Provide three words describing a rabbit. Could be "fluffy, timid, swift". Should be fine.
19+
#### User asks "Describe a rabbit in 3 words". That's fine. Provide three adjectives. No policy conflict.
2020
#### </thinking>
2121
22-
Fluffy, timid, swift.
22+
Fluffy, curious, swift.
2323
```
2424

2525
## Demo Debug
@@ -29,32 +29,30 @@ Fluffy, timid, swift.
2929
OBL_DEBUG=1 ollama_generate -m "$model" -p "$prompt"
3030
```
3131
```
32-
[DEBUG] 22:43:27:385303500: ollama_generate: [-m] [gpt-oss:120b] [-p] [Describe a rabbit in 3 words]
33-
[DEBUG] 22:43:27:422530900: ollama_generate: init: model: [] prompt: []
34-
[DEBUG] 22:43:27:446886600: ollama_generate: while getopts: OPTARG: [gpt-oss:120b] opt: [m]
35-
[DEBUG] 22:43:27:477300500: ollama_generate: while getopts: OPTARG: [Describe a rabbit in 3 words] opt: [p]
36-
[DEBUG] 22:43:27:508716200: ollama_generate: final: model: [gpt-oss:120b] prompt: [Describe a rabbit in 3 words]
37-
[DEBUG] 22:43:27:539741200: ollama_generate: checking: model: [gpt-oss:120b]
38-
[DEBUG] 22:43:27:560339300: ollama_generate: checked: model: [gpt-oss:120b]
39-
[DEBUG] 22:43:27:608114800: ollama_generate_json: [gpt-oss:120b] [Describe a rabbit in 3 words]
40-
[DEBUG] 22:43:27:651212600: ollama_generate_json: json_payload: {"model":"gpt-oss:120b","prompt":"Describe a rabbit in 3 words","stream":false,"thinking":false}
41-
[DEBUG] 22:43:27:688076500: ollama_api_post: [/api/generate] {"model":"gpt-oss:120b","prompt":"Describe a rabbit in 3 words","stream":false,"thinking":false}
42-
[DEBUG] 22:43:27:725332600: _call_curl: [POST] [/api/generate] {"model":"gpt-oss:120b","prompt":"Describe a rabbit in 3 words","stream":false,"thinking":false}
43-
[DEBUG] 22:43:27:790691600: _call_curl: OBL_API: https://ollama.com
44-
[DEBUG] 22:43:27:812581900: _call_curl: Turbo Mode
45-
[DEBUG] 22:43:27:835372200: _call_curl: json_body: {"model":"gpt-oss:120b","prompt":"Describe a rabbit in 3 words","stream":false,"thinking":false}
46-
[DEBUG] 22:43:27:856952300: _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] 22:43:29:502895600: ollama_api_post: success
48-
[DEBUG] 22:43:29:523937000: ollama_generate_json: success
49-
[DEBUG] 22:43:29:577714200: ollama_generate: result: 384 bytes: {"model":"gpt-oss:120b","created_at":"2025-08-21T20:43:28.960196187Z","response":"Fluffy, timid, hoppy.","thinking":"The
50-
[DEBUG] 22:43:29:658409500: ollama_generate: thinking: off
51-
[DEBUG] 22:43:29:705043100: ollama_generate: thinking FOUND
32+
[DEBUG] 11:30:13:395400000: ollama_generate: [-m] [gpt-oss:120b] [-p] [Describe a rabbit in 3 words]
33+
[DEBUG] 11:30:13:407797000: ollama_generate: init: model: [] prompt: []
34+
[DEBUG] 11:30:13:414662000: ollama_generate: while getopts: OPTARG: [gpt-oss:120b] opt: [m]
35+
[DEBUG] 11:30:13:421217000: ollama_generate: while getopts: OPTARG: [Describe a rabbit in 3 words] opt: [p]
36+
[DEBUG] 11:30:13:427892000: ollama_generate: final: model: [gpt-oss:120b] prompt: [Describe a rabbit in 3 words]
37+
[DEBUG] 11:30:13:433947000: ollama_generate: checking: model: [gpt-oss:120b]
38+
[DEBUG] 11:30:13:439795000: ollama_generate: checked: model: [gpt-oss:120b]
39+
[DEBUG] 11:30:13:451761000: ollama_generate_json: [gpt-oss:120b] [Describe a rabbit in 3 words]
40+
[DEBUG] 11:30:13:464200000: ollama_generate_json: json_payload: {"model":"gpt-oss:120b","prompt":"Describe a rabbit in 3 words","stream":false,"thinking":false}
41+
[DEBUG] 11:30:13:474732000: ollama_api_post: [/api/generate] {"model":"gpt-oss:120b","prompt":"Describe a rabbit in 3 words","stream":false,"thinking":false}
42+
[DEBUG] 11:30:13:480291000: _call_curl: [POST] [/api/generate] {"model":"gpt-oss:120b","prompt":"Describe a rabbit in 3 words","stream":false,"thinking":false}
43+
[DEBUG] 11:30:13:491711000: _call_curl: OBL_API: https://ollama.com
44+
[DEBUG] 11:30:13:497136000: _call_curl: Turbo Mode
45+
[DEBUG] 11:30:13:502413000: _call_curl: json_body: {"model":"gpt-oss:120b","prompt":"Describe a rabbit in 3 words","stream":false,"thinking":false}
46+
[DEBUG] 11:30:13:507702000: _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] 11:30:14:527945000: ollama_api_post: success
48+
[DEBUG] 11:30:14:538481000: ollama_generate_json: success
49+
[DEBUG] 11:30:14:554860000: ollama_generate: result: 311 bytes: {"model":"gpt-oss:120b","created_at":"2025-08-22T09:30:14.219676248Z","response":"Fluffy, twitchy, curious.","thinking":
50+
[DEBUG] 11:30:14:576829000: ollama_generate: thinking: off
51+
[DEBUG] 11:30:14:590798000: ollama_generate: thinking FOUND
5252
#### <thinking>
53-
#### The user asks: "Describe a rabbit in 3 words". This is a simple request. No policy violation. Provide three words that describe a rabbit, e.g., fluffy, timid, hoppy.
54-
55-
We can comply.
53+
#### User asks: "Describe a rabbit in 3 words". That's straightforward. No policy violation. Provide answer.
5654
#### </thinking>
5755
58-
Fluffy, timid, hoppy.
59-
[DEBUG] 22:43:29:754649100: ollama_generate: success
56+
Fluffy, twitchy, curious.
57+
[DEBUG] 11:30:14:604160000: ollama_generate: success
6058
```

0 commit comments

Comments
 (0)