PromptBuilder::generateImageResult(): WordPressAiClientResultsDTOGenerativeAiResult

In this article

Generates an image result from the prompt.

Return

WordPressAiClientResultsDTOGenerativeAiResult The generated result containing image candidates.

Source

public function generateImageResult(): GenerativeAiResult
{
    // Include image in output modalities
    $this->includeOutputModalities(ModalityEnum::image());
    // Generate and return the result with image generation capability
    return $this->generateResult(CapabilityEnum::imageGeneration());
}

Changelog

VersionDescription
0.1.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.