rails_mcp_engine 0.4.0 → 0.4.2
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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 1fc2df9d33f43a23bac0d1474e3504d761a3040af9e2fd21798e9fabcbeb5234
|
|
4
|
+
data.tar.gz: 29ccf61986dd70e34b099290b39fc95c1f66270f7362c56a42aee7d673e96258
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 639659931f065cb9e49be2344666e6e30fbe58531b5ddbbe588fcab195f41be86e3efbda5ce6e0385cf7f57c78b26a7d2feed8ce46dc6c73ae894ebe2e346c65
|
|
7
|
+
data.tar.gz: b34d737dbf1ec61083e1146d57991eaa2215a02999457da56f825366fb97030ff8eed9d8be81b3f88f4d40004c2f6dc9e4a799150c9fa5ee8ff2f77c90ac96a7
|
|
@@ -61,7 +61,7 @@ module ToolSchema
|
|
|
61
61
|
case type
|
|
62
62
|
when :string then :string
|
|
63
63
|
when :integer then :integer
|
|
64
|
-
when :float then :float
|
|
64
|
+
when :float then :number # RubyLLM uses `number` not `float`
|
|
65
65
|
when :boolean then :boolean
|
|
66
66
|
else :any
|
|
67
67
|
end
|
|
@@ -71,7 +71,7 @@ module ToolSchema
|
|
|
71
71
|
def self.scalar_method(type)
|
|
72
72
|
case type
|
|
73
73
|
when :integer then :integer
|
|
74
|
-
when :float then :float
|
|
74
|
+
when :float then :number # RubyLLM uses `number` not `float`
|
|
75
75
|
when :boolean then :boolean
|
|
76
76
|
else :string
|
|
77
77
|
end
|
|
@@ -21,10 +21,15 @@ module ToolSchema
|
|
|
21
21
|
parent = Tools
|
|
22
22
|
parent.send(:remove_const, tool_constant) if parent.const_defined?(tool_constant, false)
|
|
23
23
|
|
|
24
|
+
tool_name = T.let(schema[:name], String)
|
|
24
25
|
klass = Class.new(RubyLLM::Tool) do
|
|
25
26
|
description(schema[:description])
|
|
26
27
|
params(&RubyLlmBuilder.params_block(schema[:params]))
|
|
27
28
|
|
|
29
|
+
# Override RubyLLM::Tool#name to use the tool_name from ToolMeta
|
|
30
|
+
# instead of the auto-generated name from the Ruby class name.
|
|
31
|
+
define_method(:name) { tool_name }
|
|
32
|
+
|
|
28
33
|
define_method(:execute) do |**kwargs|
|
|
29
34
|
before_call&.call(kwargs)
|
|
30
35
|
result = service_class.new.public_send(schema[:entrypoint], **kwargs)
|