ollama-ruby 1.16.0 → 1.18.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 +19 -0
- data/Rakefile +1 -1
- data/lib/ollama/options.rb +62 -1
- data/lib/ollama/version.rb +1 -1
- data/ollama-ruby.gemspec +5 -5
- metadata +5 -5
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8b59a75052a3d4f15cc99f14a6ffa1172140f7bbd4ef474e20d986843ba02247
|
|
4
|
+
data.tar.gz: ed28da23aa8242a86d6b4c3c1aa1d9b10fabb683a074dc451e49a0e7cdafd8bd
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c9085a100ed588c9846c4497227812fd6ee62a7ec2023f07c124dd49ddb5418ae0d0634936e44ea764e24a7f18b7c1b7799928daf1dcfbf030e11759b44409eb
|
|
7
|
+
data.tar.gz: 8a222ef6114c2e22c7ae6b8ad1d65c5ad638318088aa31580f5de45e2c4a63700fb124b6e59d0a39824a3757a4c909507f8c51c85786be0d6c2ff35c1010c585
|
data/CHANGES.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# Changes
|
|
2
2
|
|
|
3
|
+
## 2025-12-19 v1.18.0
|
|
4
|
+
|
|
5
|
+
- Updated `gem_hadar` development dependency from version **2.8** to **2.9**
|
|
6
|
+
|
|
7
|
+
## 2025-12-19 v1.17.0
|
|
8
|
+
|
|
9
|
+
- Changed `s.required_ruby_version` in the gemspec from "~> 3.1" to ">= 3.1" to allow usage with **Ruby 3.1** and higher, including **4.0**
|
|
10
|
+
- Updated `s.rubygems_version` from **3.7.2** to **4.0.2**
|
|
11
|
+
- Replaced `bundle update` with `bundle update --all` in the update command
|
|
12
|
+
- Added **4.0-rc** release candidate to the Ruby version matrix (commented out)
|
|
13
|
+
- Enhanced `Ollama::Options` class with detailed inline comments for all
|
|
14
|
+
configuration parameters including `numa`, `num_ctx`, `num_batch`, `num_gpu`,
|
|
15
|
+
`main_gpu`, `low_vram`, `f16_kv`, `logits_all`, `vocab_only`, `use_mmap`,
|
|
16
|
+
`use_mlock`, `num_thread`, `num_keep`, `seed`, `num_predict`, `top_k`,
|
|
17
|
+
`top_p`, `min_p`, `tfs_z`, `typical_p`, `repeat_last_n`, `temperature`,
|
|
18
|
+
`repeat_penalty`, `presence_penalty`, `frequency_penalty`, `mirostat`,
|
|
19
|
+
`mirostat_tau`, `mirostat_eta`, `penalize_newline`, and `stop`
|
|
20
|
+
- Updated documentation link format from `.md` to `.mdx`
|
|
21
|
+
|
|
3
22
|
## 2025-12-09 v1.16.0
|
|
4
23
|
|
|
5
24
|
- Added support for handling HTTP 400 Bad Request errors
|
data/Rakefile
CHANGED
data/lib/ollama/options.rb
CHANGED
|
@@ -15,41 +15,102 @@ require 'ollama/json_loader'
|
|
|
15
15
|
# top_p: 0.9
|
|
16
16
|
# )
|
|
17
17
|
#
|
|
18
|
-
# [Options are explained in the parameters for the modelfile.](https://github.com/ollama/ollama/blob/main/docs/modelfile.
|
|
18
|
+
# [Options are explained in the parameters for the modelfile.](https://github.com/ollama/ollama/blob/main/docs/modelfile.mdx)
|
|
19
19
|
class Ollama::Options
|
|
20
20
|
include Ollama::DTO
|
|
21
21
|
extend Ollama::JSONLoader
|
|
22
22
|
|
|
23
|
+
# Hash defining the valid types for each configuration parameter
|
|
24
|
+
# This is used for type validation in the setter methods
|
|
23
25
|
@@types = {
|
|
26
|
+
# NUMA (Non-Uniform Memory Access) support - enables NUMA awareness
|
|
24
27
|
numa: [ false, true ],
|
|
28
|
+
|
|
29
|
+
# Context window size - maximum context length for the model
|
|
25
30
|
num_ctx: Integer,
|
|
31
|
+
|
|
32
|
+
# Batch size for processing - number of tokens to process together
|
|
26
33
|
num_batch: Integer,
|
|
34
|
+
|
|
35
|
+
# Number of GPUs to use - specifies how many GPU devices to utilize
|
|
27
36
|
num_gpu: Integer,
|
|
37
|
+
|
|
38
|
+
# Main GPU index - specifies which GPU to use as the primary device
|
|
28
39
|
main_gpu: Integer,
|
|
40
|
+
|
|
41
|
+
# Low VRAM mode - reduces memory usage at the cost of performance
|
|
29
42
|
low_vram: [ false, true ],
|
|
43
|
+
|
|
44
|
+
# Use FP16 for KV cache - enables half-precision floating point for key-value cache
|
|
30
45
|
f16_kv: [ false, true ],
|
|
46
|
+
|
|
47
|
+
# Output all logits - includes all token logits in the output (for debugging)
|
|
31
48
|
logits_all: [ false, true ],
|
|
49
|
+
|
|
50
|
+
# Vocabulary only mode - only loads vocabulary without weights
|
|
32
51
|
vocab_only: [ false, true ],
|
|
52
|
+
|
|
53
|
+
# Use memory mapping - enables memory mapping for model loading
|
|
33
54
|
use_mmap: [ false, true ],
|
|
55
|
+
|
|
56
|
+
# Use memory locking - locks model in memory to prevent swapping
|
|
34
57
|
use_mlock: [ false, true ],
|
|
58
|
+
|
|
59
|
+
# Number of threads to use - specifies CPU thread count for computation
|
|
35
60
|
num_thread: Integer,
|
|
61
|
+
|
|
62
|
+
# Number of tokens to keep - keeps the first N tokens from the context
|
|
36
63
|
num_keep: Integer,
|
|
64
|
+
|
|
65
|
+
# Random seed for reproducible results - sets the random seed for generation
|
|
37
66
|
seed: Integer,
|
|
67
|
+
|
|
68
|
+
# Maximum number of tokens to predict - limits generation length
|
|
38
69
|
num_predict: Integer,
|
|
70
|
+
|
|
71
|
+
# Top-K sampling - limits sampling to top K tokens
|
|
39
72
|
top_k: Integer,
|
|
73
|
+
|
|
74
|
+
# Top-P (nucleus) sampling - limits sampling to tokens that sum to P probability
|
|
40
75
|
top_p: Float,
|
|
76
|
+
|
|
77
|
+
# Minimum probability for token sampling - sets minimum token probability threshold
|
|
41
78
|
min_p: Float,
|
|
79
|
+
|
|
80
|
+
# Tail Free Sampling - controls the tail free sampling parameter
|
|
42
81
|
tfs_z: Float,
|
|
82
|
+
|
|
83
|
+
# Typical P sampling - controls the typical P sampling parameter
|
|
43
84
|
typical_p: Float,
|
|
85
|
+
|
|
86
|
+
# Repeat last N tokens - prevents repetition of last N tokens
|
|
44
87
|
repeat_last_n: Integer,
|
|
88
|
+
|
|
89
|
+
# Temperature - controls randomness in generation (0.0 = deterministic, 1.0 = default)
|
|
45
90
|
temperature: Float,
|
|
91
|
+
|
|
92
|
+
# Repeat penalty - penalizes repeated tokens (higher values = more diversity)
|
|
46
93
|
repeat_penalty: Float,
|
|
94
|
+
|
|
95
|
+
# Presence penalty - penalizes tokens that appear in the context
|
|
47
96
|
presence_penalty: Float,
|
|
97
|
+
|
|
98
|
+
# Frequency penalty - penalizes tokens based on their frequency in the context
|
|
48
99
|
frequency_penalty: Float,
|
|
100
|
+
|
|
101
|
+
# Mirostat sampling - controls the Mirostat sampling algorithm (0 = disabled)
|
|
49
102
|
mirostat: Integer,
|
|
103
|
+
|
|
104
|
+
# Mirostat tau parameter - controls the target entropy for Mirostat
|
|
50
105
|
mirostat_tau: Float,
|
|
106
|
+
|
|
107
|
+
# Mirostat eta parameter - controls the learning rate for Mirostat
|
|
51
108
|
mirostat_eta: Float,
|
|
109
|
+
|
|
110
|
+
# Penalize newline tokens - whether to penalize newline tokens
|
|
52
111
|
penalize_newline: [ false, true ],
|
|
112
|
+
|
|
113
|
+
# Stop sequences - array of strings that will stop generation
|
|
53
114
|
stop: Array,
|
|
54
115
|
}
|
|
55
116
|
|
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.18.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.18.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]
|
|
@@ -17,14 +17,14 @@ Gem::Specification.new do |s|
|
|
|
17
17
|
s.homepage = "https://github.com/flori/ollama-ruby".freeze
|
|
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
|
-
s.required_ruby_version = Gem::Requirement.new("
|
|
21
|
-
s.rubygems_version = "
|
|
20
|
+
s.required_ruby_version = Gem::Requirement.new(">= 3.1".freeze)
|
|
21
|
+
s.rubygems_version = "4.0.2".freeze
|
|
22
22
|
s.summary = "Interacting with the Ollama API".freeze
|
|
23
23
|
s.test_files = ["spec/ollama/client/doc_spec.rb".freeze, "spec/ollama/client_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_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/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.9".freeze])
|
|
28
28
|
s.add_development_dependency(%q<all_images>.freeze, ["~> 0.6".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.
|
|
4
|
+
version: 1.18.0
|
|
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.9'
|
|
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.9'
|
|
26
26
|
- !ruby/object:Gem::Dependency
|
|
27
27
|
name: all_images
|
|
28
28
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -404,7 +404,7 @@ require_paths:
|
|
|
404
404
|
- lib
|
|
405
405
|
required_ruby_version: !ruby/object:Gem::Requirement
|
|
406
406
|
requirements:
|
|
407
|
-
- - "
|
|
407
|
+
- - ">="
|
|
408
408
|
- !ruby/object:Gem::Version
|
|
409
409
|
version: '3.1'
|
|
410
410
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
@@ -413,7 +413,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
413
413
|
- !ruby/object:Gem::Version
|
|
414
414
|
version: '0'
|
|
415
415
|
requirements: []
|
|
416
|
-
rubygems_version:
|
|
416
|
+
rubygems_version: 4.0.2
|
|
417
417
|
specification_version: 4
|
|
418
418
|
summary: Interacting with the Ollama API
|
|
419
419
|
test_files:
|