Class: Ollama::Tool
Defined Under Namespace
Classes: Function
Instance Attribute Summary collapse
-
#function ⇒ Object
readonly
Returns the value of attribute function.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(type:, function:) ⇒ Tool
constructor
A new instance of Tool.
Methods included from DTO
#as_array_of_hashes, #as_json, #empty?, #to_json
Constructor Details
#initialize(type:, function:) ⇒ Tool
Returns a new instance of Tool.
6 7 8 |
# File 'lib/ollama/tool.rb', line 6 def initialize(type:, function:) @type, @function = type, function.to_hash end |
Instance Attribute Details
#function ⇒ Object (readonly)
Returns the value of attribute function.
4 5 6 |
# File 'lib/ollama/tool.rb', line 4 def function @function end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
4 5 6 |
# File 'lib/ollama/tool.rb', line 4 def type @type end |