Class: RubyLLM::Parameter
- Inherits:
-
Object
- Object
- RubyLLM::Parameter
- Defined in:
- lib/ruby_llm/tool.rb
Overview
Parameter definition for Tool methods. Specifies type constraints, descriptions, and whether parameters are required.
Instance Attribute Summary collapse
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#required ⇒ Object
readonly
Returns the value of attribute required.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(name, type: 'string', desc: nil, required: true) ⇒ Parameter
constructor
A new instance of Parameter.
Constructor Details
#initialize(name, type: 'string', desc: nil, required: true) ⇒ Parameter
Returns a new instance of Parameter.
9 10 11 12 13 14 |
# File 'lib/ruby_llm/tool.rb', line 9 def initialize(name, type: 'string', desc: nil, required: true) @name = name @type = type @description = desc @required = required end |
Instance Attribute Details
#description ⇒ Object (readonly)
Returns the value of attribute description.
7 8 9 |
# File 'lib/ruby_llm/tool.rb', line 7 def description @description end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
7 8 9 |
# File 'lib/ruby_llm/tool.rb', line 7 def name @name end |
#required ⇒ Object (readonly)
Returns the value of attribute required.
7 8 9 |
# File 'lib/ruby_llm/tool.rb', line 7 def required @required end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
7 8 9 |
# File 'lib/ruby_llm/tool.rb', line 7 def type @type end |