Class: ImageGeneration::Service::GenerateResult
- Inherits:
-
Data
- Object
- Data
- ImageGeneration::Service::GenerateResult
- Defined in:
- app/services/image_generation/service.rb
Overview
Generate an image.
param prompt [String]
param reference_images [Array] Library images (up to 14).
Silently ignored for providers that don't support them.
param aspect_ratio [String] e.g. "16:9". Passed to Gemini REST path only.
param image_size [String] "1K"/"2K"/"4K". Gemini REST path only.
Instance Attribute Summary collapse
-
#input_tokens ⇒ Object
readonly
Returns the value of attribute input_tokens.
-
#jpeg_data ⇒ Object
readonly
Returns the value of attribute jpeg_data.
-
#output_tokens ⇒ Object
readonly
Returns the value of attribute output_tokens.
-
#provider ⇒ Object
readonly
Returns the value of attribute provider.
Instance Method Summary collapse
-
#initialize(jpeg_data:, provider:, input_tokens: nil, output_tokens: nil) ⇒ GenerateResult
constructor
A new instance of GenerateResult.
Constructor Details
#initialize(jpeg_data:, provider:, input_tokens: nil, output_tokens: nil) ⇒ GenerateResult
Returns a new instance of GenerateResult.
148 149 150 |
# File 'app/services/image_generation/service.rb', line 148 def initialize(jpeg_data:, provider:, input_tokens: nil, output_tokens: nil) super end |
Instance Attribute Details
#input_tokens ⇒ Object (readonly)
Returns the value of attribute input_tokens
147 148 149 |
# File 'app/services/image_generation/service.rb', line 147 def input_tokens @input_tokens end |
#jpeg_data ⇒ Object (readonly)
Returns the value of attribute jpeg_data
147 148 149 |
# File 'app/services/image_generation/service.rb', line 147 def jpeg_data @jpeg_data end |
#output_tokens ⇒ Object (readonly)
Returns the value of attribute output_tokens
147 148 149 |
# File 'app/services/image_generation/service.rb', line 147 def output_tokens @output_tokens end |
#provider ⇒ Object (readonly)
Returns the value of attribute provider
147 148 149 |
# File 'app/services/image_generation/service.rb', line 147 def provider @provider end |