Class: Ollama::Tool

Inherits:
Object
  • Object
show all
Includes:
DTO
Defined in:
lib/ollama/tool.rb

Defined Under Namespace

Classes: Function

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#functionObject (readonly)

Returns the value of attribute function.



4
5
6
# File 'lib/ollama/tool.rb', line 4

def function
  @function
end

#typeObject (readonly)

Returns the value of attribute type.



4
5
6
# File 'lib/ollama/tool.rb', line 4

def type
  @type
end