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.
Хуков нет.
Использование
$TextGenerationOperationModelInterface = new TextGenerationOperationModelInterface(); // use class methods
Методы
Список изменений
| С версии 0.1.0 | Введена. |
Код TextGenerationOperationModelInterface{} 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;
}