wzkb_ai_prompt_builder
Filter the AI Client prompt builder before the request is sent.
Use this to set model preferences, for example $builder->using_model_preference( … ).
Type: filter
Since: 3.2.0
Source: includes/pro/ai/class-prompt-service.php line 255
Parameters
| Type | Name | Description |
|---|---|---|
\WP_AI_Client_Prompt_Builder |
$builder |
Prompt builder. |
string |
$question |
Visitor question. |
array[] |
$articles |
Articles sent as context. |
string |
$provider |
Provider ID, or an empty string when WordPress chooses. |
Usage
add_filter( 'wzkb_ai_prompt_builder', function($builder, $question, $articles, $provider) {
// ...
return $builder;
} );