struct AI::Provider::ImageModel::Result

Overview

The result of an image model doGenerate call.

Included Modules

Defined in:

ai/provider/image_model/image_model.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(images : Array(ImageData), warnings : Array(Shared::Warning), response : ResultResponse, provider_metadata : ProviderMetadata | Nil = nil, usage : Usage | Nil = nil) #

[View source]
def self.new(pull : JSON::PullParser) #

[View source]
def self.new(*, __pull_for_json_serializable pull : JSON::PullParser) #

[View source]

Instance Method Detail

def images : Array(ImageData) #

Generated images as base64 encoded strings or binary data.


[View source]
def provider_metadata : ProviderMetadata | Nil #

Additional provider-specific metadata.


[View source]
def response : ResultResponse #

Response information for telemetry and debugging.


[View source]
def usage : Usage | Nil #

Optional token usage for the image generation call.


[View source]
def warnings : Array(Shared::Warning) #

Warnings for the call, e.g. unsupported features.


[View source]