WordPress\AiClient

AiClient::promptpublic staticWP 0.1.0

Creates a new prompt builder for fluent API usage.

Returns a PromptBuilder instance configured with the specified or default registry. The traditional API methods in this class delegate to PromptBuilder for all generation logic.

Метод класса: AiClient{}

Хуков нет.

Возвращает

PromptBuilder. The prompt builder instance.

Использование

$result = AiClient::prompt( $prompt, ?ProviderRegistry $registry ): PromptBuilder;
$prompt(Prompt)
Optional initial prompt content.
По умолчанию: null
?ProviderRegistry $registry
.
По умолчанию: null

Список изменений

С версии 0.1.0 Введена.

Код AiClient::prompt() WP 7.0

public static function prompt($prompt = null, ?ProviderRegistry $registry = null): PromptBuilder
{
    return new PromptBuilder($registry ?? self::defaultRegistry(), $prompt, self::$eventDispatcher);
}