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