WordPress\AiClient
AiClient::generateSpeechResult
Generates speech using the traditional API approach.
Метод класса: AiClient{}
Хуков нет.
Возвращает
GenerativeAiResult. The generation result.
Использование
$result = AiClient::generateSpeechResult( $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::generateSpeechResult() AiClient::generateSpeechResult WP 7.0
public static function generateSpeechResult($prompt, $modelOrConfig = null, ?ProviderRegistry $registry = null): GenerativeAiResult
{
self::validateModelOrConfigParameter($modelOrConfig);
return self::getConfiguredPromptBuilder($prompt, $modelOrConfig, $registry)->generateSpeechResult();
}