wpseek.com
Bazujące na WordPress narzędzie wyszukiwania dla deweloperów i twórców motywów.



wp_ai_client_prompt › WordPress Function

Od7.0.0
Przestarzałyn/a
› wp_ai_client_prompt ( $prompt = null )
Parametry:
  • (string|WordPressAiClientMessagesDTOMessagePart|WordPressAiClientMessagesDTOMessage|array|list<string|WordPressAiClientMessagesDTOMessagePart|array>|list<WordPressAiClientMessagesDTOMessage>|null) $prompt Optional. Initial prompt content. A string for simple text prompts, a MessagePart or Message object for structured content, an array for a message array shape, or a list of parts or messages for multi-turn conversations. Default null.
    Wymagane: Nie
    Domyślny: null
Powrót:
  • (WP_AI_Client_Prompt_Builder) The prompt builder instance.
Zdefiniowane na:
Codex:

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.


Źródło

function wp_ai_client_prompt( $prompt = null ): WP_AI_Client_Prompt_Builder {
	return new WP_AI_Client_Prompt_Builder( AiClient::defaultRegistry(), $prompt );
}