struct AI::Provider::ImageModel::CallOptions

Overview

Options for the doGenerate call.

Included Modules

Defined in:

ai/provider/image_model/image_model.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(prompt : String | Nil, n : Int32, provider_options : Shared::ProviderOptions, size : String | Nil = nil, aspect_ratio : String | Nil = nil, seed : Int32 | Nil = nil, files : Array(File) | Nil = nil, mask : File | Nil = nil, headers : Shared::Headers | 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 aspect_ratio : String | Nil #

Aspect ratio of the images to generate (format: "{width}:{height}").


[View source]
def files : Array(File) | Nil #

Array of images for image editing or variation generation.


[View source]
def headers : Shared::Headers | Nil #

Additional HTTP headers to be sent with the request.


[View source]
def mask : File | Nil #

Mask image for inpainting operations.


[View source]
def n : Int32 #

Number of images to generate.


[View source]
def prompt : String | Nil #

Prompt for the image generation. Some operations, like upscaling, may not require a prompt.


[View source]
def provider_options : Shared::ProviderOptions #

Additional provider-specific options.


[View source]
def seed : Int32 | Nil #

Seed for the image generation.


[View source]
def size : String | Nil #

Size of the images to generate (format: "{width}x{height}").


[View source]