ollama-ruby 1.24.0 → 1.25.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 54d8913adab981adc75ef6c69fc059349fbd55249fa919d94b52fdf19985554b
4
- data.tar.gz: f4df502f748953d6ca799ec58cebf1f04d507d554fa68c1b5262e90b2a2b75b0
3
+ metadata.gz: 1a8729b76057bbe9bda6d774b3d5ee4e9227ed0c6f3eaa6518b40efe5b0e979a
4
+ data.tar.gz: c56b35df0a1afe4cdf12cc06a95763d62d4fdcdc5fc96093c0b28484c4174d6b
5
5
  SHA512:
6
- metadata.gz: 4eacd7afe3fed35b8d49e16ebdc37297d8a1084ea31060d55a6710dc1f84479e4b0a41f251048d1d3292bf05f244b4eb0bccb9250c6f97735006df94a9a593e1
7
- data.tar.gz: 4af350efba4685daea10c6c9edc9b5399fb1e4cf8b39302c1a532aeb0ed7dc9dfda149b686838115d757aa7f1f24d5a19a882cc7d1f869e478d3531e02cd2ff2
6
+ metadata.gz: 9f51f5d86982a8d32c69df5f6660fd4a51e6c054fbfb9ef245c40fc46cac1d18cf42c00544649839377ccc7f2383cf9bb040e37a4a1f72fe517dde1b66708add
7
+ data.tar.gz: f870f0e817b8c33072ceac03e73d076f93c0b396942a689068fccbb8b14fa217b68105e152f087ea0fc3871a71a927f2612831a7b2c8538a1ae91ec6bb76118c
data/CHANGES.md CHANGED
@@ -1,24 +1,33 @@
1
1
  # Changes
2
2
 
3
+ ## 2026-10-17 v1.25.0
4
+
5
+ * `DTO#to_hash` now only rejects `nil` attribute values instead of also
6
+ rejecting empty collections, so empty hashes and arrays such as
7
+ `properties: {}` or `required: []` survive serialization
8
+ * `Property#initialize` converts `enum` with `enum&.to_a` instead of
9
+ `Array(enum)`, leaving `enum` as `nil` when not provided so no empty `enum:
10
+ []` leaks into the output
11
+
3
12
  ## 2026-10-16 v1.24.0
4
13
 
5
- * Add `Options.from_string` to parse `show`-format parameter strings with
6
- type inference for `Boolean`, `Integer`, `Float`, and `Array` types.
7
- * Add `draft_num_predict: Integer` to the `@@types` registry and freeze the
8
- `@@types` hash to prevent accidental mutation.
9
- * Fix an infinite loop in `bin/ollama_ps` by correcting the `while` condition
10
- to `duration > 0` and ensuring explicit exit codes (`exit 0` for success,
11
- `exit 1` for failure).
12
- * Add `rescue Interrupt` handling in `bin/ollama_ps` for clean `Ctrl+C` exit
13
- messages.
14
- * Update YARD documentation for the `think` parameter in
15
- `Ollama::Commands::Chat` and `Ollama::Commands::Generate` to include
16
- `"max"` as an accepted thinking level.
17
- * Document the `show` → `create` parameter import workflow in `README.md`.
18
- * Add `-i INTERVAL` to the `ollama_ps` usage block in `README.md`.
19
- * Fix backtick formatting for `Q4_K_M` and `F16` in the `ollama_ps` QUANT
20
- column documentation.
21
- * Remove vim modeline comments from `Gemfile` and `Rakefile`.
14
+ * Add `Options.from_string` to parse `show`-format parameter strings with
15
+ type inference for `Boolean`, `Integer`, `Float`, and `Array` types.
16
+ * Add `draft_num_predict: Integer` to the `@@types` registry and freeze the
17
+ `@@types` hash to prevent accidental mutation.
18
+ * Fix an infinite loop in `bin/ollama_ps` by correcting the `while` condition
19
+ to `duration > 0` and ensuring explicit exit codes (`exit 0` for success,
20
+ `exit 1` for failure).
21
+ * Add `rescue Interrupt` handling in `bin/ollama_ps` for clean `Ctrl+C` exit
22
+ messages.
23
+ * Update YARD documentation for the `think` parameter in
24
+ `Ollama::Commands::Chat` and `Ollama::Commands::Generate` to include
25
+ `"max"` as an accepted thinking level.
26
+ * Document the `show` → `create` parameter import workflow in `README.md`.
27
+ * Add `-i INTERVAL` to the `ollama_ps` usage block in `README.md`.
28
+ * Fix backtick formatting for `Q4_K_M` and `F16` in the `ollama_ps` QUANT
29
+ column documentation.
30
+ * Remove vim modeline comments from `Gemfile` and `Rakefile`.
22
31
 
23
32
  ## 2026-08-12 v1.23.2
24
33
 
data/lib/ollama/dto.rb CHANGED
@@ -128,7 +128,7 @@ module Ollama::DTO
128
128
  # non-empty attributes
129
129
  def to_hash(*ignored)
130
130
  self.class.attributes.each_with_object({}) { |a, h| h[a] = send(a) }.
131
- reject { _2.nil? || _2.ask_and_send(:size) == 0 }
131
+ reject { _2.nil? }
132
132
  end
133
133
 
134
134
  # The as_json method converts the object's attributes into a JSON-compatible
@@ -58,6 +58,6 @@ class Ollama::Tool::Function::Parameters::Property
58
58
  # @param properties [ Hash, nil ] optional nested properties for 'object' types
59
59
  # @param items [ Object, nil ] optional schema definition for 'array' type elements
60
60
  def initialize(type:, description:, enum: nil, properties: nil, items: nil)
61
- @type, @description, @enum, @properties, @items = type, description, Array(enum), properties, items
61
+ @type, @description, @enum, @properties, @items = type, description, enum&.to_a, properties, items
62
62
  end
63
63
  end
@@ -1,6 +1,6 @@
1
1
  module Ollama
2
2
  # Ollama version
3
- VERSION = '1.24.0'
3
+ VERSION = '1.25.0'
4
4
  VERSION_ARRAY = VERSION.split('.').map(&:to_i) # :nodoc:
5
5
  VERSION_MAJOR = VERSION_ARRAY[0] # :nodoc:
6
6
  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.24.0 ruby lib
2
+ # stub: ollama-ruby 1.25.0 ruby lib
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "ollama-ruby".freeze
6
- s.version = "1.24.0".freeze
6
+ s.version = "1.25.0".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]
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.24.0
4
+ version: 1.25.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Florian Frank