PromptBuilder::generateTextResult(): WordPressAiClientResultsDTOGenerativeAiResult

In this article

Generates a text result from the prompt.

Return

WordPressAiClientResultsDTOGenerativeAiResult The generated result containing text candidates.

Source

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

Changelog

VersionDescription
0.1.0Introduced.

User Contributed Notes

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