llm.rb 12.5.0 → 12.5.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: 665281b1c81541ff2f9621138cee510e473dfbda2c7dcff7d1a324e5fe558c89
4
- data.tar.gz: c3ee596e41885038dc831ef6459da330d1984fea0125a9dbc5aa7d0ff8e21061
3
+ metadata.gz: 5eec18b65456b95a668fd5552fbd1c73464e26c55d07cc980efe5973e82fd548
4
+ data.tar.gz: 4ab12f000f12f64e65afbca3ac4b08d79751f6d860c7cc9cab685c0e688d20c7
5
5
  SHA512:
6
- metadata.gz: cecf7fa0a2b1c6aff010c537b6741c74e537104eb9a67e3c2cd2840d06963040834c87263f71f6a1f815a4be831efa7740b2c03eb3f5fde9bbb274be4ee69c5c
7
- data.tar.gz: 8b695e7c1656bf427bb095a257e954437b5b2dfc46e4d22349eb91dab9981eac1c5fc6b46bca89ecfec14986d386a0fba6303ef4dcf39a82345d3a136e944092
6
+ metadata.gz: 86a7207e852129c3e22a747e74c8f5bcf12666886786104a38b01d2d80cc8cf82a008678fc7c5817203e138b6929aeeaba090af87f95fbea4185e7b733bbc8ff
7
+ data.tar.gz: 40c2df5d31af69ff01c666259c2f39c54f545a9bb1115e4419266c2ce3a467467236ac3f2c9d39154d3242ebf9d12cb1541dad3c21f1b60290c1a816ac09003e
data/CHANGELOG.md CHANGED
@@ -15,8 +15,23 @@
15
15
 
16
16
  ## What's next
17
17
 
18
+ ## v12.5.1
19
+
18
20
  Changes since `v12.5.0`.
19
21
 
22
+ This release reverts the global `LLM::Function` registry fallback for tool
23
+ resolution that was added in v12.5.0.
24
+
25
+ ### Change
26
+
27
+ * **function: remove the global registry fallback for tool resolution** <br>
28
+ Remove the `LLM::Function.find_by_name` fallback that was added in
29
+ v12.5.0 as an intermediate step between available-tools lookup and
30
+ raising `LLM::NoSuchToolError`. Tool calls not found in the available
31
+ tools list now go directly to `function_missing` (which raises
32
+ `LLM::NoSuchToolError`) without first checking the global
33
+ `LLM::Function` registry.
34
+
20
35
  ## v12.5.0
21
36
 
22
37
  Changes since `v12.4.0`.
data/README.md CHANGED
@@ -185,7 +185,7 @@ with all of the builtin tools available.
185
185
 
186
186
  ```ruby
187
187
  require "llm"
188
- require "lll/tools"
188
+ require "llm/tools"
189
189
 
190
190
  llm = LLM.deepseek(key: ENV["KEY"])
191
191
  agent = LLM::Agent.new(llm)
data/lib/llm/message.rb CHANGED
@@ -120,9 +120,7 @@ module LLM
120
120
  # @return [Array<LLM::Function>]
121
121
  def functions
122
122
  @functions ||= tool_calls.filter_map do |fn|
123
- function = available_tools.find { _1.name.to_s == fn.name } ||
124
- LLM::Function.find_by_name(fn.name) ||
125
- function_missing(fn.name)
123
+ function = available_tools.find { _1.name.to_s == fn.name } || function_missing(fn.name)
126
124
  function = function.dup
127
125
  function.tap { _1.id = fn.id }
128
126
  function.tap { _1.arguments = fn.arguments }
data/lib/llm/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module LLM
4
- VERSION = "12.5.0"
4
+ VERSION = "12.5.1"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: llm.rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 12.5.0
4
+ version: 12.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - robert