ollama-ruby 1.12.0 → 1.13.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 +4 -4
- data/CHANGES.md +10 -0
- data/lib/ollama/image.rb +1 -1
- data/lib/ollama/version.rb +1 -1
- data/ollama-ruby.gemspec +2 -2
- data/spec/ollama/image_spec.rb +2 -2
- data/spec/ollama/message_spec.rb +1 -1
- 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: 521a4b8692c845b11a9927e253e53da2edcc8375d027bf00d19a46926d65b884
|
|
4
|
+
data.tar.gz: 8796169c2f3e2e43386cb14f630f2d9f540a055f237c782c649241dffa7f7d69
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 481c77743cfd7c169b033a8a3842cb5d6c2e90172b737e146c8bf99e39beb2f4900633c7d44bf5b48713732d0d492f4a3245ea50752b779c0cb75ca444521696
|
|
7
|
+
data.tar.gz: ba733be59a456f04b2e6e3349179d9dc5f4a8cd15bedfdcf9f69981f4b38c8b4c809289eec311dbdf51cf6b0c2eadb9bff332a989aa9134e100897d1632f2c86
|
data/CHANGES.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# Changes
|
|
2
2
|
|
|
3
|
+
## 2025-12-03 v1.13.0
|
|
4
|
+
|
|
5
|
+
- Updated `Ollama::Image#for_string` method to use `Base64.strict_encode64` for
|
|
6
|
+
image encoding
|
|
7
|
+
- Modified test expectations in `image_spec.rb` with new size **132196** and
|
|
8
|
+
checksum **20420**
|
|
9
|
+
- Updated `message_spec.rb` JSON payload to remove trailing newline from image
|
|
10
|
+
data
|
|
11
|
+
- Enhanced base64 encoding strictness for image handling in Ollama library
|
|
12
|
+
|
|
3
13
|
## 2025-11-30 v1.12.0
|
|
4
14
|
|
|
5
15
|
- `ollama_cli`
|
data/lib/ollama/image.rb
CHANGED
|
@@ -59,7 +59,7 @@ class Ollama::Image
|
|
|
59
59
|
# @return [ Ollama::Image ] a new Image instance initialized with the
|
|
60
60
|
# encoded string data and optional path
|
|
61
61
|
def for_string(string, path: nil)
|
|
62
|
-
for_base64(Base64.
|
|
62
|
+
for_base64(Base64.strict_encode64(string), path:)
|
|
63
63
|
end
|
|
64
64
|
|
|
65
65
|
# Creates a new Image object from an IO object by reading its contents and
|
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.
|
|
2
|
+
# stub: ollama-ruby 1.13.0 ruby lib
|
|
3
3
|
|
|
4
4
|
Gem::Specification.new do |s|
|
|
5
5
|
s.name = "ollama-ruby".freeze
|
|
6
|
-
s.version = "1.
|
|
6
|
+
s.version = "1.13.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]
|
data/spec/ollama/image_spec.rb
CHANGED
|
@@ -21,8 +21,8 @@ describe Ollama::Image do
|
|
|
21
21
|
end
|
|
22
22
|
|
|
23
23
|
it 'can be converted to base64 string' do
|
|
24
|
-
expect(image.to_s.size).to eq
|
|
25
|
-
expect(image.to_s.sum).to eq
|
|
24
|
+
expect(image.to_s.size).to eq 132196
|
|
25
|
+
expect(image.to_s.sum).to eq 20420
|
|
26
26
|
expect(image.to_s[0, 40]).to eq '/9j/4AAQSkZJRgABAQAASABIAAD/4QBYRXhpZgAA'
|
|
27
27
|
end
|
|
28
28
|
|
data/spec/ollama/message_spec.rb
CHANGED
|
@@ -26,7 +26,7 @@ describe Ollama::Message do
|
|
|
26
26
|
images: [ image ],
|
|
27
27
|
)
|
|
28
28
|
expect(message.to_json).to eq(
|
|
29
|
-
'{"role":"user","content":"hello world","thinking":"which world?","images":["dGVzdA
|
|
29
|
+
'{"role":"user","content":"hello world","thinking":"which world?","images":["dGVzdA=="]}'
|
|
30
30
|
)
|
|
31
31
|
end
|
|
32
32
|
|