WordPress\AiClient\Providers\Models\TextGeneration\Contracts

TextGenerationModelInterface::generateTextResultpublicWP 0.1.0

Generates text from a prompt.

Method of the class: TextGenerationModelInterface{}

No Hooks.

Returns

GenerativeAiResult. Result containing generated text.

Usage

$TextGenerationModelInterface = new TextGenerationModelInterface();
$TextGenerationModelInterface->generateTextResult( $prompt ): GenerativeAiResult;
$prompt(list) (required)
Array of messages containing the text generation prompt.

Changelog

Since 0.1.0 Introduced.

TextGenerationModelInterface::generateTextResult() code WP 7.0

public function generateTextResult(array $prompt): GenerativeAiResult;