WordPress\AiClient\Providers\Models\ImageGeneration\Contracts
ImageGenerationModelInterface{}
Interface for models that support image generation.
Provides synchronous methods for generating images from text prompts.
No Hooks.
Usage
$ImageGenerationModelInterface = new ImageGenerationModelInterface(); // use class methods
Methods
Changelog
| Since 0.1.0 | Introduced. |
ImageGenerationModelInterface{} ImageGenerationModelInterface{} code WP 7.0
interface ImageGenerationModelInterface
{
/**
* Generates images from a prompt.
*
* @since 0.1.0
*
* @param list<Message> $prompt Array of messages containing the image generation prompt.
* @return GenerativeAiResult Result containing generated images.
*/
public function generateImageResult(array $prompt): GenerativeAiResult;
}