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