Class: Ollama::Tool::Function::Parameters::Property

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

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:, description:, enum: nil) ⇒ Property

Returns a new instance of Property.



6
7
8
# File 'lib/ollama/tool/function/parameters/property.rb', line 6

def initialize(type:, description:, enum: nil)
  @type, @description, @enum = type, description, Array(enum)
end

Instance Attribute Details

#descriptionObject (readonly)

Returns the value of attribute description.



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

def description
  @description
end

#enumObject (readonly)

Returns the value of attribute enum.



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

def enum
  @enum
end

#typeObject (readonly)

Returns the value of attribute type.



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

def type
  @type
end