#[non_exhaustive]pub struct ImageGenerationRequestBuilder<M, P = Missing>where
M: ImageGenerationModel,{ /* private fields */ }Available on crate feature
image only.Expand description
A builder for ImageGenerationRequest.
Can be sent to a model provider.
Implementations§
Source§impl<M> ImageGenerationRequestBuilder<M, Missing>where
M: ImageGenerationModel,
impl<M> ImageGenerationRequestBuilder<M, Missing>where
M: ImageGenerationModel,
Source§impl<M, P> ImageGenerationRequestBuilder<M, P>where
M: ImageGenerationModel,
impl<M, P> ImageGenerationRequestBuilder<M, P>where
M: ImageGenerationModel,
Sourcepub fn prompt(
self,
prompt: &str,
) -> ImageGenerationRequestBuilder<M, Provided<String>>
pub fn prompt( self, prompt: &str, ) -> ImageGenerationRequestBuilder<M, Provided<String>>
Sets the prompt for the image generation request
Sourcepub fn additional_params(self, params: Value) -> Self
pub fn additional_params(self, params: Value) -> Self
Adds additional parameters to the image generation request.
Source§impl<M> ImageGenerationRequestBuilder<M, Provided<String>>where
M: ImageGenerationModel,
impl<M> ImageGenerationRequestBuilder<M, Provided<String>>where
M: ImageGenerationModel,
pub fn build(self) -> ImageGenerationRequest
pub async fn send( self, ) -> Result<ImageGenerationResponse<M::Response>, ImageGenerationError>
Auto Trait Implementations§
impl<M, P> Freeze for ImageGenerationRequestBuilder<M, P>
impl<M, P> RefUnwindSafe for ImageGenerationRequestBuilder<M, P>where
M: RefUnwindSafe,
P: RefUnwindSafe,
impl<M, P> Send for ImageGenerationRequestBuilder<M, P>where
P: Send,
impl<M, P> Sync for ImageGenerationRequestBuilder<M, P>where
P: Sync,
impl<M, P> Unpin for ImageGenerationRequestBuilder<M, P>
impl<M, P> UnsafeUnpin for ImageGenerationRequestBuilder<M, P>where
M: UnsafeUnpin,
P: UnsafeUnpin,
impl<M, P> UnwindSafe for ImageGenerationRequestBuilder<M, P>where
M: UnwindSafe,
P: UnwindSafe,
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more