Module: LLM::Tool::Param
- Included in:
- LLM::Tool
- Defined in:
- lib/llm/shell/internal/llm.rb/lib/llm/tool/param.rb
Overview
The LLM::Tool::Param module extends the LLM::Tool class with a “param” method that can define a parameter for simple types. For complex types, use LLM::Tool.params instead.
Defined Under Namespace
Modules: Utils
Instance Method Summary collapse
Instance Method Details
#param(name, type, description, options = {}) ⇒ Object
36 37 38 39 40 41 42 43 44 |
# File 'lib/llm/shell/internal/llm.rb/lib/llm/tool/param.rb', line 36 def param(name, type, description, = {}) lock do function.params do |schema| leaf = schema.public_send(Utils.resolve(type)) leaf = Utils.setup(leaf, description, ) schema.object(name => leaf) end end end |