WordPress\AiClient\Providers\Models\TextGeneration\Contracts

TextGenerationOperationModelInterface{}interfaceWP 0.1.0

Interface for models that support asynchronous text generation operations.

Provides methods for initiating long-running text generation tasks.

Хуков нет.

Использование

$TextGenerationOperationModelInterface = new TextGenerationOperationModelInterface();
// use class methods

Методы

  1. public generateTextOperation(array $prompt)

Список изменений

С версии 0.1.0 Введена.

Код TextGenerationOperationModelInterface{} WP 7.1.2

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;
}