WordPress\AiClient\Providers\Models\ImageGeneration\Contracts
ImageGenerationModelInterface{}
Interface for models that support image generation.
Provides synchronous methods for generating images from text prompts.
Хуков нет.
Использование
$ImageGenerationModelInterface = new ImageGenerationModelInterface(); // use class methods
Методы
Список изменений
| С версии 0.1.0 | Введена. |
Код ImageGenerationModelInterface{} ImageGenerationModelInterface{} WP 7.1.3
interface ImageGenerationModelInterface
{
/**
* Generates images from a prompt.
*
* @since 0.1.0
*
* @param list<Message> $prompt Array of messages containing the image generation prompt.
* @return GenerativeAiResult Result containing generated images.
*/
public function generateImageResult(array $prompt): GenerativeAiResult;
}