pub struct ImageCallOptions {
pub prompt: Option<String>,
pub n: u32,
pub size: Option<Size>,
pub aspect_ratio: Option<AspectRatio>,
pub seed: Option<u64>,
pub files: Option<Vec<ImageFile>>,
pub mask: Option<ImageFile>,
pub provider_options: SharedProviderOptions,
pub abort_signal: Option<AbortSignal>,
pub max_retries: Option<u32>,
pub timeout: Option<TimeoutConfiguration>,
pub headers: Option<SharedHeaders>,
}Expand description
Options passed to ImageModel::do_generate.
Aligned with V4 ImageModelV4CallOptions.
Fields§
§prompt: Option<String>Prompt for the image generation. None for operations (e.g. upscaling)
that do not require a prompt.
n: u32Number of images to generate.
size: Option<Size>Size of the images, in {width}x{height} format.
None uses the provider’s default size.
aspect_ratio: Option<AspectRatio>Aspect ratio of the images, in {width}:{height} format.
None uses the provider’s default aspect ratio.
seed: Option<u64>Seed for deterministic generation. None uses the provider’s default.
files: Option<Vec<ImageFile>>Images for image editing or variation generation.
mask: Option<ImageFile>Mask image for inpainting operations.
provider_options: SharedProviderOptionsAdditional provider-specific options, keyed by provider name.
abort_signal: Option<AbortSignal>Abort signal for cancelling the operation.
max_retries: Option<u32>Per-call retry override. None uses the model default.
timeout: Option<TimeoutConfiguration>Per-call operation timeout.
headers: Option<SharedHeaders>Additional HTTP headers to send with the request.
Implementations§
Trait Implementations§
Source§impl Clone for ImageCallOptions
impl Clone for ImageCallOptions
Source§impl Debug for ImageCallOptions
impl Debug for ImageCallOptions
Source§impl<'de> Deserialize<'de> for ImageCallOptions
impl<'de> Deserialize<'de> for ImageCallOptions
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Serialize for ImageCallOptions
impl Serialize for ImageCallOptions
Source§impl TS for ImageCallOptions
impl TS for ImageCallOptions
Source§type WithoutGenerics = ImageCallOptions
type WithoutGenerics = ImageCallOptions
WithoutGenerics should just be Self.
If the type does have generic parameters, then all generic parameters must be replaced with
a dummy type, e.g ts_rs::Dummy or (). The only requirement for these dummy types is that
EXPORT_TO must be None. Read moreSource§type OptionInnerType = ImageCallOptions
type OptionInnerType = ImageCallOptions
std::option::Option<T>, then this associated type is set to T.
All other implementations of TS should set this type to Self instead.Source§fn docs() -> Option<String>
fn docs() -> Option<String>
TS is derived, docs are
automatically read from your doc comments or #[doc = ".."] attributesSource§fn decl_concrete(cfg: &Config) -> String
fn decl_concrete(cfg: &Config) -> String
TS::decl().
If this type is not generic, then this function is equivalent to TS::decl().Source§fn decl(cfg: &Config) -> String
fn decl(cfg: &Config) -> String
type User = { user_id: number, ... }.
This function will panic if the type has no declaration. Read moreSource§fn inline(cfg: &Config) -> String
fn inline(cfg: &Config) -> String
{ user_id: number }.
This function will panic if the type cannot be inlined.Source§fn inline_flattened(cfg: &Config) -> String
fn inline_flattened(cfg: &Config) -> String
Source§fn visit_generics(v: &mut impl TypeVisitor)where
Self: 'static,
fn visit_generics(v: &mut impl TypeVisitor)where
Self: 'static,
Source§fn output_path() -> Option<PathBuf>
fn output_path() -> Option<PathBuf>
T should be exported, relative to the output directory.
The returned path does not include any base directory. Read moreSource§fn visit_dependencies(v: &mut impl TypeVisitor)where
Self: 'static,
fn visit_dependencies(v: &mut impl TypeVisitor)where
Self: 'static,
Source§fn dependencies(cfg: &Config) -> Vec<Dependency>where
Self: 'static,
fn dependencies(cfg: &Config) -> Vec<Dependency>where
Self: 'static,
Source§fn export(cfg: &Config) -> Result<(), ExportError>where
Self: 'static,
fn export(cfg: &Config) -> Result<(), ExportError>where
Self: 'static,
TS::export_all. Read moreSource§fn export_all(cfg: &Config) -> Result<(), ExportError>where
Self: 'static,
fn export_all(cfg: &Config) -> Result<(), ExportError>where
Self: 'static,
TS::export. Read more