Module: LLM::Tool::Param
- Included in:
- LLM::Tool
- Defined in:
- 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 |
# File 'lib/llm/tool/param.rb', line 36 def param(name, type, description, = {}) lock do function.params do |schema| resolved = Utils.resolve(schema, type) schema.object(name => Utils.setup(resolved, description, )) end end end |