ollama-ruby 1.26.0 → 1.26.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 +46 -0
- data/bin/ollama_cli +1 -1
- data/lib/ollama/client.rb +7 -3
- data/lib/ollama/handlers/progress.rb +4 -0
- data/lib/ollama/version.rb +1 -1
- data/ollama-ruby.gemspec +4 -4
- metadata +4 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 16a7241e60413c891888a95cbe528849c300074f8b8a0a381aa197ac6075054c
|
|
4
|
+
data.tar.gz: 76755733aa2db2d655e72d09eb0298dd972e865c425d31608334baa9f7446321
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0420fa76c8f25c9631847942300b6add9ab5c9b70540de4a5c25ac6d69c717760e1c6bd73dc3f8e4acf843ec7416c23cdba508612b4d95026c8c9a295f32e571
|
|
7
|
+
data.tar.gz: 1ad3e44863babbc14aa56ba5027e20caeeb2abaf6e91f570ea31693182c6ca6953a48f0b2dfe0bdca8f550edc9d234909033efd3dde9fb8519558800ea3f1084
|
data/CHANGES.md
CHANGED
|
@@ -1,5 +1,51 @@
|
|
|
1
1
|
# Changes
|
|
2
2
|
|
|
3
|
+
## 2026-11-15 v1.26.2
|
|
4
|
+
|
|
5
|
+
### Fixes
|
|
6
|
+
|
|
7
|
+
- Call `infobar.finish` and `infobar.newline` in `Progress#call` when
|
|
8
|
+
`response.status == 'success'` to commit the progress bar to scrollback and
|
|
9
|
+
move the cursor below it, preventing subsequent output from overwriting the
|
|
10
|
+
bar.
|
|
11
|
+
|
|
12
|
+
### Improvements
|
|
13
|
+
|
|
14
|
+
- Replaced `getconf _NPROCESSORS_ONLN` with `nproc` for `bundle install` job
|
|
15
|
+
count detection.
|
|
16
|
+
|
|
17
|
+
### Build & CI
|
|
18
|
+
|
|
19
|
+
- Added `git config --global --add safe.directory /work` to resolve permission
|
|
20
|
+
errors in CI environments.
|
|
21
|
+
|
|
22
|
+
### Documentation
|
|
23
|
+
|
|
24
|
+
- Replaced the YARD cheatsheet in `.contexts/yard.md` with a comprehensive
|
|
25
|
+
`Document` class example.
|
|
26
|
+
- Updated instructions to generate only YARD comment blocks, excluding
|
|
27
|
+
executable code.
|
|
28
|
+
- Defined rules to omit `@return [void]` clauses.
|
|
29
|
+
- Demonstrated usage of `@!attribute`, `@overload`, `@yield`, and `@deprecated`
|
|
30
|
+
tags.
|
|
31
|
+
|
|
32
|
+
## 2026-11-13 v1.26.1
|
|
33
|
+
|
|
34
|
+
### Fixes
|
|
35
|
+
|
|
36
|
+
- Buffer JSONL lines in the streaming path of `Ollama::Client#request` to
|
|
37
|
+
prevent `JSON::ParserError` when the server flushes partial JSON lines.
|
|
38
|
+
|
|
39
|
+
### Improvements
|
|
40
|
+
|
|
41
|
+
- Update the chat continuation hint in `bin/ollama_cli` to suggest using the
|
|
42
|
+
`/input` command instead of the removed `-c` flag.
|
|
43
|
+
|
|
44
|
+
### Build & CI
|
|
45
|
+
|
|
46
|
+
- Raise minimum development dependency `gem_hadar` to **2.21.0**.
|
|
47
|
+
- Update `rubygems_version` to **4.0.24** in `ollama-ruby.gemspec`.
|
|
48
|
+
|
|
3
49
|
## 2026-10-23 v1.26.0
|
|
4
50
|
|
|
5
51
|
### Features
|
data/bin/ollama_cli
CHANGED
data/lib/ollama/client.rb
CHANGED
|
@@ -170,9 +170,13 @@ class Ollama::Client
|
|
|
170
170
|
url = @base_url + path
|
|
171
171
|
responses = Enumerator.new do |yielder|
|
|
172
172
|
if stream
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
173
|
+
buf = +''
|
|
174
|
+
response_block = -> chunk, _remaining_bytes, _total_bytes do
|
|
175
|
+
buf << chunk
|
|
176
|
+
while (idx = buf.index(?\n))
|
|
177
|
+
line, buf = buf.slice!(0..idx), buf
|
|
178
|
+
(response_line = parse_json(line)) and yielder.yield response_line
|
|
179
|
+
end
|
|
176
180
|
end
|
|
177
181
|
response = excon(url).send(method, headers:, body:, response_block:)
|
|
178
182
|
else
|
|
@@ -59,6 +59,10 @@ class Ollama::Handlers::Progress
|
|
|
59
59
|
force: true
|
|
60
60
|
)
|
|
61
61
|
end
|
|
62
|
+
if response.status == 'success'
|
|
63
|
+
infobar.finish(message: message(@current, @total))
|
|
64
|
+
infobar.newline
|
|
65
|
+
end
|
|
62
66
|
if error = response.error
|
|
63
67
|
infobar.puts bold { "Error: " } + red { error }
|
|
64
68
|
end
|
data/lib/ollama/version.rb
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
# by hand; it is rewritten on every `rake version` invocation.
|
|
6
6
|
module Ollama
|
|
7
7
|
# The current version of the Ollama gem as a String.
|
|
8
|
-
VERSION = '1.26.
|
|
8
|
+
VERSION = '1.26.2'
|
|
9
9
|
VERSION_ARRAY = VERSION.split('.').map(&:to_i) # :nodoc:
|
|
10
10
|
VERSION_MAJOR = VERSION_ARRAY[0] # :nodoc:
|
|
11
11
|
VERSION_MINOR = VERSION_ARRAY[1] # :nodoc:
|
data/ollama-ruby.gemspec
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
|
2
|
-
# stub: ollama-ruby 1.26.
|
|
2
|
+
# stub: ollama-ruby 1.26.2 ruby lib
|
|
3
3
|
|
|
4
4
|
Gem::Specification.new do |s|
|
|
5
5
|
s.name = "ollama-ruby".freeze
|
|
6
|
-
s.version = "1.26.
|
|
6
|
+
s.version = "1.26.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]
|
|
@@ -18,13 +18,13 @@ Gem::Specification.new do |s|
|
|
|
18
18
|
s.licenses = ["MIT".freeze]
|
|
19
19
|
s.rdoc_options = ["--title".freeze, "Ollama-ruby - Interacting with the Ollama API".freeze, "--main".freeze, "README.md".freeze]
|
|
20
20
|
s.required_ruby_version = Gem::Requirement.new(">= 3.1".freeze)
|
|
21
|
-
s.rubygems_version = "4.0.
|
|
21
|
+
s.rubygems_version = "4.0.24".freeze
|
|
22
22
|
s.summary = "Interacting with the Ollama API".freeze
|
|
23
23
|
s.test_files = ["spec/ollama/base_url_spec.rb".freeze, "spec/ollama/client/doc_spec.rb".freeze, "spec/ollama/client_spec.rb".freeze, "spec/ollama/commands/blob_exists_spec.rb".freeze, "spec/ollama/commands/chat_spec.rb".freeze, "spec/ollama/commands/copy_spec.rb".freeze, "spec/ollama/commands/create_spec.rb".freeze, "spec/ollama/commands/delete_spec.rb".freeze, "spec/ollama/commands/embed_spec.rb".freeze, "spec/ollama/commands/embeddings_spec.rb".freeze, "spec/ollama/commands/generate_spec.rb".freeze, "spec/ollama/commands/ps_spec.rb".freeze, "spec/ollama/commands/pull_spec.rb".freeze, "spec/ollama/commands/push_blob_spec.rb".freeze, "spec/ollama/commands/push_spec.rb".freeze, "spec/ollama/commands/show_spec.rb".freeze, "spec/ollama/commands/tags_spec.rb".freeze, "spec/ollama/commands/version_spec.rb".freeze, "spec/ollama/digester_spec.rb".freeze, "spec/ollama/handlers/collector_spec.rb".freeze, "spec/ollama/handlers/dump_json_spec.rb".freeze, "spec/ollama/handlers/dump_yaml_spec.rb".freeze, "spec/ollama/handlers/markdown_spec.rb".freeze, "spec/ollama/handlers/nop_spec.rb".freeze, "spec/ollama/handlers/print_spec.rb".freeze, "spec/ollama/handlers/progress_spec.rb".freeze, "spec/ollama/handlers/say_spec.rb".freeze, "spec/ollama/handlers/single_spec.rb".freeze, "spec/ollama/image_spec.rb".freeze, "spec/ollama/message_spec.rb".freeze, "spec/ollama/options_spec.rb".freeze, "spec/ollama/tool_spec.rb".freeze, "spec/spec_helper.rb".freeze]
|
|
24
24
|
|
|
25
25
|
s.specification_version = 4
|
|
26
26
|
|
|
27
|
-
s.add_development_dependency(%q<gem_hadar>.freeze, [">= 2.
|
|
27
|
+
s.add_development_dependency(%q<gem_hadar>.freeze, [">= 2.21.0".freeze])
|
|
28
28
|
s.add_development_dependency(%q<all_images>.freeze, ["~> 0.12".freeze])
|
|
29
29
|
s.add_development_dependency(%q<rspec>.freeze, ["~> 3.2".freeze])
|
|
30
30
|
s.add_development_dependency(%q<kramdown>.freeze, ["~> 2.0".freeze])
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: ollama-ruby
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.26.
|
|
4
|
+
version: 1.26.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Florian Frank
|
|
@@ -15,14 +15,14 @@ dependencies:
|
|
|
15
15
|
requirements:
|
|
16
16
|
- - ">="
|
|
17
17
|
- !ruby/object:Gem::Version
|
|
18
|
-
version: 2.
|
|
18
|
+
version: 2.21.0
|
|
19
19
|
type: :development
|
|
20
20
|
prerelease: false
|
|
21
21
|
version_requirements: !ruby/object:Gem::Requirement
|
|
22
22
|
requirements:
|
|
23
23
|
- - ">="
|
|
24
24
|
- !ruby/object:Gem::Version
|
|
25
|
-
version: 2.
|
|
25
|
+
version: 2.21.0
|
|
26
26
|
- !ruby/object:Gem::Dependency
|
|
27
27
|
name: all_images
|
|
28
28
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -427,7 +427,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
427
427
|
- !ruby/object:Gem::Version
|
|
428
428
|
version: '0'
|
|
429
429
|
requirements: []
|
|
430
|
-
rubygems_version: 4.0.
|
|
430
|
+
rubygems_version: 4.0.24
|
|
431
431
|
specification_version: 4
|
|
432
432
|
summary: Interacting with the Ollama API
|
|
433
433
|
test_files:
|