pub struct ImageBatchRequest {
pub id: String,
pub model_id: ModelId,
pub prompt: Option<String>,
pub n: u32,
pub size: Option<ImageSize>,
pub aspect_ratio: Option<AspectRatio>,
pub seed: Option<u64>,
pub files: Vec<ImageFile>,
pub mask: Option<ImageFile>,
pub provider_options: ProviderOptions,
}Expand description
An image generation request of a batch.
Fields§
§id: StringRequest id, unique within the batch.
model_id: ModelIdModel id at the provider.
prompt: Option<String>Text prompt.
n: u32Number of images.
size: Option<ImageSize>Image size.
aspect_ratio: Option<AspectRatio>Aspect ratio.
seed: Option<u64>Seed.
files: Vec<ImageFile>Reference images.
mask: Option<ImageFile>Mask.
provider_options: ProviderOptionsProvider options.
Implementations§
Source§impl ImageBatchRequest
impl ImageBatchRequest
Sourcepub fn new(
id: impl Into<String>,
model_id: impl Into<ModelId>,
prompt: impl Into<String>,
) -> Self
pub fn new( id: impl Into<String>, model_id: impl Into<ModelId>, prompt: impl Into<String>, ) -> Self
Creates a request for model_id.
Sourcepub fn aspect_ratio(self, aspect_ratio: AspectRatio) -> Self
pub fn aspect_ratio(self, aspect_ratio: AspectRatio) -> Self
Aspect ratio.
Sourcepub fn provider_options(self, provider_options: ProviderOptions) -> Self
pub fn provider_options(self, provider_options: ProviderOptions) -> Self
Provider options.
Trait Implementations§
Source§impl Clone for ImageBatchRequest
impl Clone for ImageBatchRequest
Source§fn clone(&self) -> ImageBatchRequest
fn clone(&self) -> ImageBatchRequest
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ImageBatchRequest
impl Debug for ImageBatchRequest
Source§impl From<ImageBatchRequest> for BatchRequest
impl From<ImageBatchRequest> for BatchRequest
Source§fn from(request: ImageBatchRequest) -> Self
fn from(request: ImageBatchRequest) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !Freeze for ImageBatchRequest
impl RefUnwindSafe for ImageBatchRequest
impl Send for ImageBatchRequest
impl Sync for ImageBatchRequest
impl Unpin for ImageBatchRequest
impl UnsafeUnpin for ImageBatchRequest
impl UnwindSafe for ImageBatchRequest
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more