Module: LLM::Tool::Param::Utils Private
- Extended by:
- Utils
- Included in:
- Utils
- Defined in:
- lib/llm/shell/internal/llm.rb/lib/llm/tool/param.rb
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
Instance Method Summary collapse
- #resolve(type) ⇒ Object private
- #setup(leaf, description, options) ⇒ Object private
Instance Method Details
#resolve(type) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
51 52 53 54 55 56 57 58 59 60 61 |
# File 'lib/llm/shell/internal/llm.rb/lib/llm/tool/param.rb', line 51 def resolve(type) if type == String :string elsif type == Integer :integer elsif type == Float :number else type end end |
#setup(leaf, description, options) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
63 64 65 66 67 68 69 70 71 72 |
# File 'lib/llm/shell/internal/llm.rb/lib/llm/tool/param.rb', line 63 def setup(leaf, description, ) required = .fetch(:required, false) default = .fetch(:default, nil) enum = .fetch(:enum, nil) leaf.required if required leaf.description(description) if description leaf.default(default) if default leaf.enum(enum) if enum leaf end |