[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

Search

title

Body

[close]

/wp-includes/ -> ai-client.php (summary)

WordPress AI Client API.

File Size: 62 lines (3 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 2 functions

  wp_supports_ai()
  wp_ai_client_prompt()

Functions
Functions that are not part of a class:

wp_supports_ai()   X-Ref
Returns whether AI features are supported in the current environment.

return: bool Whether AI features are supported.

wp_ai_client_prompt( $prompt = null )   X-Ref
Creates a new AI prompt builder using the default provider registry.

This is the main entry point for generating AI content in WordPress. It returns
a fluent builder that can be used to configure and execute AI prompts.

The prompt can be provided as a simple string for basic text prompts, or as more
complex types for advanced use cases like multi-modal content or conversation history.

return: WP_AI_Client_Prompt_Builder The prompt builder instance.
param: string|MessagePart|Message|array|list<string|MessagePart|array>|list<Message>|null $prompt Optional. Initial prompt content.



Generated : Sat Jun 13 09:38:55 2026 Cross-referenced by PHPXref