ollama-ruby 1.19.0 → 1.19.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGES.md +10 -0
- data/bin/ollama_ps +14 -9
- data/lib/ollama/version.rb +1 -1
- data/ollama-ruby.gemspec +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9c79c75dcf2f3530d26ade8051ff7c541dd3559a1ad39cb53b1c139ddece5001
|
|
4
|
+
data.tar.gz: 652b5d050acde1837ac8a23731b7467f77c3dcae4aa8b34ce15b3dda094d73c4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e754534c172336251aac7ac822c2abc7deaa0058fe85e832c39b11eccd2088498e48ab7e14760140c01f40fd04b99e3c375e193a80e234a6877fb4c3984e6543
|
|
7
|
+
data.tar.gz: 21bac2a43656d7cc4abed8a4a44a7b8bbeb225e96977503d2f7aef72fb19522a4fd0316afcf123a18128fe93c4b55f5691a5fda21c790213f6d66afe3e4eec54
|
data/CHANGES.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# Changes
|
|
2
2
|
|
|
3
|
+
## 2026-03-08 v1.19.2
|
|
4
|
+
|
|
5
|
+
- Improve polling loop safety in `ollama_ps`.
|
|
6
|
+
- Add a robust rescue block: `rescue => e; warn "Caught #{e.class}: #{e}";
|
|
7
|
+
sleep duration`.
|
|
8
|
+
|
|
9
|
+
## 2026-03-04 v1.19.1
|
|
10
|
+
|
|
11
|
+
- Fix ps command to fetch models inside loop
|
|
12
|
+
|
|
3
13
|
## 2026-03-04 v1.19.0
|
|
4
14
|
|
|
5
15
|
- Added API key handling to the Ollama client: introduced a private `api_key`
|
data/bin/ollama_ps
CHANGED
|
@@ -35,7 +35,7 @@ require 'ollama'
|
|
|
35
35
|
include Ollama
|
|
36
36
|
require 'terminal-table'
|
|
37
37
|
require 'term/ansicolor'
|
|
38
|
-
require 'tins'
|
|
38
|
+
require 'tins/xt'
|
|
39
39
|
include Tins::GO
|
|
40
40
|
|
|
41
41
|
# The usage method displays the command-line usage information for the
|
|
@@ -194,19 +194,24 @@ opts = go 'f:i:h'
|
|
|
194
194
|
|
|
195
195
|
opts[?h] and usage
|
|
196
196
|
|
|
197
|
-
models = fetch_ps_models or exit
|
|
198
|
-
|
|
199
197
|
case opts[?f]
|
|
200
198
|
when 'json'
|
|
199
|
+
models = fetch_ps_models or exit
|
|
201
200
|
puts JSON.pretty_generate(interpret_models(models))
|
|
202
201
|
when 'yaml'
|
|
202
|
+
models = fetch_ps_models or exit
|
|
203
203
|
YAML.dump(interpret_models(models), STDOUT)
|
|
204
204
|
else
|
|
205
|
-
|
|
205
|
+
duration = opts[?i].to_i.clamp(0..)
|
|
206
206
|
begin
|
|
207
|
-
print Term::ANSIColor.clear_screen, Term::ANSIColor.move_home if
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
207
|
+
print Term::ANSIColor.clear_screen, Term::ANSIColor.move_home if duration > 0
|
|
208
|
+
if models = fetch_ps_models.full?
|
|
209
|
+
ps_table(interpret_models(models))
|
|
210
|
+
end
|
|
211
|
+
duration == 0 and break
|
|
212
|
+
sleep duration
|
|
213
|
+
rescue => e
|
|
214
|
+
warn "Caught #{e.class}: #{e}"
|
|
215
|
+
sleep duration
|
|
216
|
+
end while duration
|
|
212
217
|
end
|
data/lib/ollama/version.rb
CHANGED
data/ollama-ruby.gemspec
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
|
2
|
-
# stub: ollama-ruby 1.19.
|
|
2
|
+
# stub: ollama-ruby 1.19.2 ruby lib
|
|
3
3
|
|
|
4
4
|
Gem::Specification.new do |s|
|
|
5
5
|
s.name = "ollama-ruby".freeze
|
|
6
|
-
s.version = "1.19.
|
|
6
|
+
s.version = "1.19.2".freeze
|
|
7
7
|
|
|
8
8
|
s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
|
|
9
9
|
s.require_paths = ["lib".freeze]
|