Class: Retab::GenerateSchemaRequest
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Retab::GenerateSchemaRequest
- Defined in:
- lib/retab/schemas/generate_schema_request.rb
Constant Summary collapse
- HASH_ATTRS =
{ documents: :documents, model: :model, reasoning_effort: :reasoning_effort, instructions: :instructions, image_resolution_dpi: :image_resolution_dpi, stream: :stream }.freeze
Instance Attribute Summary collapse
-
#documents ⇒ Object
Returns the value of attribute documents.
-
#image_resolution_dpi ⇒ Object
Returns the value of attribute image_resolution_dpi.
-
#instructions ⇒ Object
Returns the value of attribute instructions.
-
#model ⇒ Object
Returns the value of attribute model.
-
#reasoning_effort ⇒ Object
Returns the value of attribute reasoning_effort.
-
#stream ⇒ Object
Returns the value of attribute stream.
Attributes inherited from Types::BaseModel
Instance Method Summary collapse
-
#initialize(json) ⇒ GenerateSchemaRequest
constructor
A new instance of GenerateSchemaRequest.
Methods inherited from Types::BaseModel
#inspect, normalize, #to_h, #to_json
Constructor Details
#initialize(json) ⇒ GenerateSchemaRequest
Returns a new instance of GenerateSchemaRequest.
25 26 27 28 29 30 31 32 33 |
# File 'lib/retab/schemas/generate_schema_request.rb', line 25 def initialize(json) hash = self.class.normalize(json) @documents = (hash[:documents] || []).map { |item| item ? Retab::MimeData.new(item) : nil } @model = hash[:model] @reasoning_effort = hash[:reasoning_effort] @instructions = hash[:instructions] @image_resolution_dpi = hash[:image_resolution_dpi] @stream = hash[:stream] end |
Instance Attribute Details
#documents ⇒ Object
Returns the value of attribute documents.
17 18 19 |
# File 'lib/retab/schemas/generate_schema_request.rb', line 17 def documents @documents end |
#image_resolution_dpi ⇒ Object
Returns the value of attribute image_resolution_dpi.
17 18 19 |
# File 'lib/retab/schemas/generate_schema_request.rb', line 17 def image_resolution_dpi @image_resolution_dpi end |
#instructions ⇒ Object
Returns the value of attribute instructions.
17 18 19 |
# File 'lib/retab/schemas/generate_schema_request.rb', line 17 def instructions @instructions end |
#model ⇒ Object
Returns the value of attribute model.
17 18 19 |
# File 'lib/retab/schemas/generate_schema_request.rb', line 17 def model @model end |
#reasoning_effort ⇒ Object
Returns the value of attribute reasoning_effort.
17 18 19 |
# File 'lib/retab/schemas/generate_schema_request.rb', line 17 def reasoning_effort @reasoning_effort end |
#stream ⇒ Object
Returns the value of attribute stream.
17 18 19 |
# File 'lib/retab/schemas/generate_schema_request.rb', line 17 def stream @stream end |