WordPress\AiClient\Providers\Models\TextGeneration\Contracts
TextGenerationOperationModelInterface{}
Interface for models that support asynchronous text generation operations.
Provides methods for initiating long-running text generation tasks.
No Hooks.
Usage
$TextGenerationOperationModelInterface = new TextGenerationOperationModelInterface(); // use class methods
Methods
Changelog
| Since 0.1.0 | Introduced. |
TextGenerationOperationModelInterface{} TextGenerationOperationModelInterface{} code WP 7.0
interface TextGenerationOperationModelInterface
{
/**
* Creates a text generation operation.
*
* @since 0.1.0
*
* @param list<Message> $prompt Array of messages containing the text generation prompt.
* @return GenerativeAiOperation The initiated text generation operation.
*/
public function generateTextOperation(array $prompt): GenerativeAiOperation;
}