File: wp-includes/php-ai-client/src/AiClient.php
-
methodAiClient::message()
Creates a new message builder for fluent API usage.
-
Validates that parameter is ModelInterface, ModelConfig, or null.
-
Configures PromptBuilder based on model/config parameter type.
-
methodAiClient::prompt()
Creates a new prompt builder for fluent API usage.
-
Generates content using a unified API that automatically detects model capabilities.
-
Generates text using the traditional API approach.
-
Generates an image using the traditional API approach.
-
Converts text to speech using the traditional API approach.
-
Generates speech using the traditional API approach.
-
Generates a video using the traditional API approach.
-
methodAiClient::isConfigured()
Checks if a provider is configured and available for use.
-
classAiClient
Main AI Client class providing both fluent and traditional APIs for AI operations.
-
Gets the default provider registry instance.
-
Sets the event dispatcher for prompt lifecycle events.
-
Gets the event dispatcher for prompt lifecycle events.
-
methodAiClient::setCache()
Sets the PSR-16 cache for storing and retrieving cached data.
-
methodAiClient::getCache()
Gets the PSR-16 cache instance.