Class: Roseflow::OpenAI::ImageApiResponse

Inherits:
ApiResponse
  • Object
show all
Defined in:
lib/roseflow/openai/response.rb

Instance Method Summary collapse

Methods inherited from ApiResponse

#initialize, #status, #success?

Constructor Details

This class inherits a constructor from Roseflow::OpenAI::ApiResponse

Instance Method Details

#bodyObject



66
67
68
# File 'lib/roseflow/openai/response.rb', line 66

def body
  @body ||= ImageApiResponseBody.new(JSON.parse(@response.body))
end

#imagesObject



70
71
72
# File 'lib/roseflow/openai/response.rb', line 70

def images
  body.data.map { |image| Image.new(image) }
end