Skip to content

Commit ba0e3f5

Browse files
committed
v0.45.9
1 parent be54024 commit ba0e3f5

32 files changed

+1330
-1851
lines changed

README.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,14 @@ git clone https://github.com/attogram/ollama-bash-lib.git
4545
cd ollama-bash-lib
4646
source ollama_bash_lib.sh
4747

48-
# One line generation
49-
ollama_generate "mistral:7b" "Describe Bash in 3 words"
48+
# Generate a completion
49+
ollama_generate -m mistral:7b -p "Describe Bash in 3 words"
50+
5051
# Powerful, Flexible, Scripting.
5152

5253
# Tab completion to view available library functions
5354
ollama_<TAB>
55+
5456
# ollama_api_get ollama_generate_json ollama_model_random
5557
# ollama_api_ping ollama_generate_stream ollama_model_unload
5658
# ollama_api_post ollama_generate_stream_json ollama_ps
@@ -294,14 +296,15 @@ See the **[demos](demos)** directory for all demo scripts
294296

295297
| Demo | About | Script |
296298
|------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------|
299+
| [help.md](demos/help.md) | Get help (-h) for all functions | [help.sh](demos/help.sh) |
300+
| [ollama_generate.md](demos/ollama_generate.md) | Generate completion with [`ollama_generate`](#generate-functions) | [ollama_generate.sh](demos/ollama_generate.sh) |
297301
| [review.lib.md](demos/review.lib.md) | Code Review of [`ollama_bash_lib.sh`](ollama_bash_lib.sh) | [review.lib.sh](demos/review.lib.sh) |
298302
| [review.lib-security.md](demos/review.lib-security.md) | Security Review of [`ollama_bash_lib.sh`](ollama_bash_lib.sh) | [review.lib.sh](demos/review.lib-security.sh) |
299303
| [review.readme.md](demos/review.readme.md) | Marketing Review of this [`README.md`](README.md) | [review.readme.sh](demos/review.readme.sh) |
300304
| [review.funny.md](demos/review.funny.md) | Humorous project descriptions based on [`README.md`](README.md) | [review.funny.sh](demos/review.funny.sh) |
301305
| [prompt.all.models.md](demos/prompt.all.models.md) | Send a prompt to all models | [prompt.all.models.sh](demos/prompt.all.models.sh) |
302306
| [prompts.model.md](demos/prompts.model.md) | Send many prompts to a model | [prompts.model.sh](demos/prompts.model.sh) |
303307
| [ollama_chat.md](demos/ollama_chat.md) | Chat completion with [`ollama_messages_add`](#chat-functions) and [`ollama_chat`](#chat-functions) | [ollama_chat.sh](demos/ollama_chat.sh) |
304-
| [ollama_generate.md](demos/ollama_generate.md) | Generate completion with [`ollama_generate`](#generate-functions) | [ollama_generate.sh](demos/ollama_generate.sh) |
305308
| [ollama_generate_json.md](demos/ollama_generate_json.md) | Generate completion, json output with [`ollama_generate_json`](#generate-functions) | [ollama_generate_json.sh](demos/ollama_generate_json.sh) |
306309
| [ollama_generate_stream.md](demos/ollama_generate_stream.md) | Generate completion, streaming with [`ollama_generate_stream`](#generate-functions) | [ollama_generate_stream.sh](demos/ollama_generate_stream.sh) |
307310
| [ollama_generate_stream_json.md](demos/ollama_generate_stream_json.md) | Generate completion, streaming and json output with [`ollama_generate_stream_json`](#generate-functions) | [ollama_generate_stream_json.sh](demos/ollama_generate_stream_json.sh) |

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

55
## Demo
66

77
```bash
88
ollama_lib_version
99
```
10-
0.45.8
10+
0.45.9
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.8
19+
OLLAMA_LIB_VERSION : 0.45.9
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.8
3+
A [demo](../README.md#demos) of [Ollama Bash Lib](https://github.com/attogram/ollama-bash-lib) v0.45.9
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.8
3+
A [demo](../README.md#demos) of [Ollama Bash Lib](https://github.com/attogram/ollama-bash-lib) v0.45.9
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.8
3+
A [demo](../README.md#demos) of [Ollama Bash Lib](https://github.com/attogram/ollama-bash-lib) v0.45.9
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.8
3+
A [demo](../README.md#demos) of [Ollama Bash Lib](https://github.com/attogram/ollama-bash-lib) v0.45.9
44

55
## Setup
66

@@ -42,12 +42,12 @@ result: output: {"version":"0.0.0"}
4242
```
4343
ollama_api_get
4444
45-
[DEBUG] 11:36:21:146034000: ollama_api_get: []
46-
[DEBUG] 11:36:21:153820000: _call_curl: [GET] []
47-
[DEBUG] 11:36:21:161509000: _call_curl: OLLAMA_LIB_API: https://ollama.com
48-
[DEBUG] 11:36:21:168242000: _call_curl: Turbo Mode
49-
[DEBUG] 11:36:21:174913000: _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:36:21:385896000: ollama_api_get: success
45+
[DEBUG] 11:55:01:409480000: ollama_api_get: []
46+
[DEBUG] 11:55:01:414775000: _call_curl: [GET] []
47+
[DEBUG] 11:55:01:419964000: _call_curl: OLLAMA_LIB_API: https://ollama.com
48+
[DEBUG] 11:55:01:424745000: _call_curl: Turbo Mode
49+
[DEBUG] 11:55:01:429227000: _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:55:01:627673000: 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] 11:36:21:407847000: ollama_api_get: [/api/version]
67-
[DEBUG] 11:36:21:414728000: _call_curl: [GET] [/api/version]
68-
[DEBUG] 11:36:21:421749000: _call_curl: OLLAMA_LIB_API: https://ollama.com
69-
[DEBUG] 11:36:21:428110000: _call_curl: Turbo Mode
70-
[DEBUG] 11:36:21:434236000: _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:36:21:629869000: ollama_api_get: success
66+
[DEBUG] 11:55:01:645622000: ollama_api_get: [/api/version]
67+
[DEBUG] 11:55:01:652041000: _call_curl: [GET] [/api/version]
68+
[DEBUG] 11:55:01:657541000: _call_curl: OLLAMA_LIB_API: https://ollama.com
69+
[DEBUG] 11:55:01:662766000: _call_curl: Turbo Mode
70+
[DEBUG] 11:55:01:668977000: _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:55:01:841990000: 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.8
3+
A [demo](../README.md#demos) of [Ollama Bash Lib](https://github.com/attogram/ollama-bash-lib) v0.45.9
44

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

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

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

88
```bash

0 commit comments

Comments
 (0)