- Create 'Prompts'. A specific instruction provided to an AI model (ChatGPT) to generate a desired output.
- Create 'System Prompts' and assign to prompts. A set of instructions shared by many prompts. E.g. the editorial style guide or guidance on tone of voice.
- Create 'Contexts'. Additional information to be passed with your prompt. Supports the following types:
- Query results. Build a query that is run and the results get passed along with your prompt. e.g. latest posts within a category.
Supports placeholders (in prompts, system prompts and contexts). When executing a prompt, pass data to replace any placeholders. Allows you to create generic prompts and context queries so you can generate different results by passing different data.
Currently experimental. Define AI_WORKBENCH_DISABLE_BLOCKS to true to enable.
The AI Content block provides an editorial interface for inserting AI Content.
- Select from available prompts in the block settings sidebar
- Generate AI content directly in the block editor
- Review and accept updated content.
$data = [ 'tag_name' => 'trump', 'tag_label' => 'Donald Trump' ];
$result = AI_Workbench\Prompts\run( $prompt, $data );
// $result is an array containing:
// - 'result': The AI-generated content
// - 'prompt': The full prompt WP_Post object
// - 'generated_at': Timestamp when generated
// - 'prompt_id': The prompt post ID
echo $result['result']; // Output the AI resultAdd either Open AI key or AWS Bedrock credentials in the settings page, and pick from available models.