Skip to main content

Module image_generation

Module image_generation 

Source
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§

ImageGenerationRequest
ImageGenerationRequestBuilder
Builds an image request for a prompt. Defaults to 256 by 256 pixels; supported dimensions depend on the provider.
ImageGenerationResponse
Generated image bytes and normalized provider metadata.

Traits§

NormalizeImageGenerationResponse
Normalizes provider image payloads. The driver writes the provider, request id and raw afterwards.