Available on crate feature
image only.Expand description
Image-generation requests, normalized responses, and model interfaces.
use rig_core::DynModel;
use rig_core::image_generation::ImageGenerationRequestBuilder;
use rig_core::operation::ImageGeneration;
let request = ImageGenerationRequestBuilder::new("A mountain lake")
.width(1024)
.height(1024)
.build();
let response = model.call(request).await?;Structs§
- Image
Generation Request - Image
Generation Request Builder - Builds an image request for a prompt. Defaults to 256 by 256 pixels; supported dimensions depend on the provider.
- Image
Generation Response - Generated image bytes and normalized provider metadata.
Traits§
- Normalize
Image Generation Response - Normalizes provider image payloads. The driver writes the provider, request
id and
rawafterwards.