ruby_llm-modes 0.1.0 → 0.1.1

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: b5c39593331641f16a7a0f41b3467091e82f4aad359be7be1aa96a9a07074094
4
- data.tar.gz: b075c2888ddae01f0197e76893be2c04c8ead01c9362395f55f011e6407d3db5
3
+ metadata.gz: 755b03b85f42540d9c7ccff774763791113e8db055a86a2667ddc5cc603d4959
4
+ data.tar.gz: 394a9ace1fed3aaa7f7ec0bccf871c6fb6d735d36f650b9a7ecdd737951eceb8
5
5
  SHA512:
6
- metadata.gz: 8f42966bb7c51173c3326170a1d1d0eda2364964ae4ebd69b05184726127497d1ab6a489ec341bde98d7d20f92a55e686378d089ffa04e187e6d6a7c269ac55d
7
- data.tar.gz: ec5b553284f1c6ff88c6295e82ab7ea0592d3831c02e8b2441258690ae375d0a118359aee4a89d83978c5dd6efa4e8fac3c28cd06bb080cdf85e8c0817e13943
6
+ metadata.gz: 7e0f8b7f92b92520578b35a31b27e39954d1b1c313ca0d6c6f2d2c955865d1df749d9c5be90761bd901b3692130213680f8a970e13b0a923101e0a4ed72980df
7
+ data.tar.gz: 38703a7b68a5f4b383a37b641c0c7f74046fe1be718225b626a1f139dbe3de479e8948a1dde71c4c4493107ecc967f7478e7068dba860242376a654c5988ee5a
data/CHANGELOG.md CHANGED
@@ -7,6 +7,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.1.1] - 2026-10-14
11
+
12
+ ### Changed
13
+
14
+ - README, the `:judge` declaration error, and the classifier comment name
15
+ ruby_llm 2.1.0 as the release that ships `RubyLLM.judge`, instead of
16
+ pointing at RubyLLM's main branch.
17
+
10
18
  ## [0.1.0] - 2026-09-26
11
19
 
12
20
  ### Added
data/README.md CHANGED
@@ -62,7 +62,7 @@ gem "ruby_llm-modes"
62
62
 
63
63
  Requires [RubyLLM](https://rubyllm.com) 2.0 or newer and Ruby 3.2 or newer.
64
64
 
65
- The `:judge` example above currently requires RubyLLM from its `main` branch; RubyLLM 2.0.0 supports `:chat`.
65
+ The `:judge` example above requires RubyLLM 2.1.0 or newer; RubyLLM 2.0.0 supports `:chat`.
66
66
 
67
67
  ## Modes
68
68
 
@@ -193,7 +193,7 @@ One `RubyLLM.judge` call with a single `choice` question whose options are the m
193
193
 
194
194
  `confidence` comes from the judgment model with the distribution and reflects how **concentrated** it is on one mode, not a self-report. The gem passes it through as is. There is no free text, so `reason` is nil and a clarification has to be a mode of its own.
195
195
 
196
- `model:` and `provider:` are passed to `RubyLLM.judge` as given; without them RubyLLM's defaults apply. `judge:` replaces `RubyLLM.judge` with any callable taking the same arguments and returning a `RubyLLM::Judgment`. `RubyLLM.judge` is not in ruby_llm 2.0.0; it is on RubyLLM's main branch. On a release without it, `classify_with :judge` raises `DeclarationError` unless `judge:` is given.
196
+ `model:` and `provider:` are passed to `RubyLLM.judge` as given; without them RubyLLM's defaults apply. `judge:` replaces `RubyLLM.judge` with any callable taking the same arguments and returning a `RubyLLM::Judgment`. `RubyLLM.judge` ships with ruby_llm 2.1.0 and newer. On an older release, `classify_with :judge` raises `DeclarationError` unless `judge:` is given.
197
197
 
198
198
  ## Custom classifiers
199
199
 
@@ -19,7 +19,7 @@ module RubyLLM
19
19
  # RubyLLM.judge; it is called with the same arguments and must return
20
20
  # a Judgment.
21
21
  #
22
- # RubyLLM.judge is not in every RubyLLM release. Without it the
22
+ # RubyLLM.judge ships with ruby_llm 2.1.0 and newer. Without it the
23
23
  # backend cannot run, and the router says so when it is built.
24
24
  class Judge
25
25
  QUESTION = <<~TEXT.strip
@@ -78,7 +78,9 @@ module RubyLLM
78
78
 
79
79
  def judge
80
80
  return @judge if @judge
81
- raise DeclarationError, "RubyLLM.judge is not available in ruby_llm #{RubyLLM::VERSION}" unless self.class.available?
81
+ unless self.class.available?
82
+ raise DeclarationError, "RubyLLM.judge is not available in ruby_llm #{RubyLLM::VERSION}; the :judge backend needs ruby_llm 2.1.0 or newer"
83
+ end
82
84
 
83
85
  RubyLLM.method(:judge)
84
86
  end
@@ -249,7 +249,7 @@ module RubyLLM
249
249
  when :judge
250
250
  return if classifier_spec[:options][:judge] || Classifiers::Judge.available?
251
251
 
252
- raise DeclarationError, "#{name}: RubyLLM.judge is not available in ruby_llm #{RubyLLM::VERSION}; the :judge backend needs a release that ships RubyLLM::Judge"
252
+ raise DeclarationError, "#{name}: RubyLLM.judge is not available in ruby_llm #{RubyLLM::VERSION}; the :judge backend needs ruby_llm 2.1.0 or newer"
253
253
  when Symbol
254
254
  raise DeclarationError, "#{name}: unknown classifier backend #{backend.inspect}"
255
255
  else
@@ -2,6 +2,6 @@
2
2
 
3
3
  module RubyLLM
4
4
  module Modes
5
- VERSION = "0.1.0"
5
+ VERSION = "0.1.1"
6
6
  end
7
7
  end
@@ -8,8 +8,8 @@ Gem::Specification.new do |spec|
8
8
  spec.authors = [ "Andrey Samsonov" ]
9
9
  spec.email = [ "me@samsonov.io" ]
10
10
 
11
- spec.summary = "Chat modes for RubyLLM: one chat, one configuration per turn, picked by a classifier"
12
- spec.description = "A mode is the configuration of one turn: a RubyLLM agent with a routing description. Declare the modes, a fallback, and a classifier; before each answer the router returns a Route that says which mode takes the turn, why, and what the classifier actually said."
11
+ spec.summary = "Declarative chat modes and automatic routing for RubyLLM"
12
+ spec.description = "Declaratively define multiple modes for a RubyLLM chat and automatically route each user message to the appropriate mode. Each mode has its own instructions, tools, model, and reasoning effort, while all modes share the conversation history. Configure mode availability and fallbacks, and inspect or test routing decisions independently of the response."
13
13
  spec.homepage = "https://github.com/kryzhovnik/ruby_llm-modes"
14
14
  spec.license = "MIT"
15
15
  spec.required_ruby_version = ">= 3.2.0"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby_llm-modes
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrey Samsonov
@@ -43,10 +43,11 @@ dependencies:
43
43
  - - "~>"
44
44
  - !ruby/object:Gem::Version
45
45
  version: '1.1'
46
- description: 'A mode is the configuration of one turn: a RubyLLM agent with a routing
47
- description. Declare the modes, a fallback, and a classifier; before each answer
48
- the router returns a Route that says which mode takes the turn, why, and what the
49
- classifier actually said.'
46
+ description: Declaratively define multiple modes for a RubyLLM chat and automatically
47
+ route each user message to the appropriate mode. Each mode has its own instructions,
48
+ tools, model, and reasoning effort, while all modes share the conversation history.
49
+ Configure mode availability and fallbacks, and inspect or test routing decisions
50
+ independently of the response.
50
51
  email:
51
52
  - me@samsonov.io
52
53
  executables: []
@@ -93,6 +94,5 @@ required_rubygems_version: !ruby/object:Gem::Requirement
93
94
  requirements: []
94
95
  rubygems_version: 3.6.9
95
96
  specification_version: 4
96
- summary: 'Chat modes for RubyLLM: one chat, one configuration per turn, picked by
97
- a classifier'
97
+ summary: Declarative chat modes and automatic routing for RubyLLM
98
98
  test_files: []