Class: RubyLLM::Parameter

Inherits:
Object
  • Object
show all
Defined in:
lib/ruby_llm/tool.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, type: 'string', desc: nil, required: true) ⇒ Parameter

Returns a new instance of Parameter.



7
8
9
10
11
12
# File 'lib/ruby_llm/tool.rb', line 7

def initialize(name, type: 'string', desc: nil, required: true)
  @name = name
  @type = type
  @description = desc
  @required = required
end

Instance Attribute Details

#descriptionObject (readonly)

Returns the value of attribute description.



5
6
7
# File 'lib/ruby_llm/tool.rb', line 5

def description
  @description
end

#nameObject (readonly)

Returns the value of attribute name.



5
6
7
# File 'lib/ruby_llm/tool.rb', line 5

def name
  @name
end

#requiredObject (readonly)

Returns the value of attribute required.



5
6
7
# File 'lib/ruby_llm/tool.rb', line 5

def required
  @required
end

#typeObject (readonly)

Returns the value of attribute type.



5
6
7
# File 'lib/ruby_llm/tool.rb', line 5

def type
  @type
end