WordPress\AiClient
AiClient::generateImageResult
Generates an image using the traditional API approach.
Метод класса: AiClient{}
Хуков нет.
Возвращает
GenerativeAiResult. The generation result.
Использование
$result = AiClient::generateImageResult( $prompt, $modelOrConfig, ?ProviderRegistry $registry ): GenerativeAiResult;
- $prompt(Prompt) (обязательный)
- The prompt content.
- $modelOrConfig(ModelInterface|ModelConfig|null)
- Optional specific model to use, or model configuration for auto-discovery, or null for defaults.
По умолчанию:null - ?ProviderRegistry $registry
- .
По умолчанию:null
Список изменений
| С версии 0.1.0 | Введена. |
Код AiClient::generateImageResult() AiClient::generateImageResult WP 7.0
public static function generateImageResult($prompt, $modelOrConfig = null, ?ProviderRegistry $registry = null): GenerativeAiResult
{
self::validateModelOrConfigParameter($modelOrConfig);
return self::getConfiguredPromptBuilder($prompt, $modelOrConfig, $registry)->generateImageResult();
}