Model_Compare
Asks one question with two models side by side, so site owners can weigh speed against answer quality.
Answers go through the same retrieval and validation as visitor questions but skip the answer cache, the question log and provider pauses. Each model costs one provider request, counted towards the daily cap.
Namespace: WebberZone\Better_Search\Pro\AI
Since: 4.5.1
Source: includes/pro/ai/class-model-compare.php line 25
Methods
__construct()
Constructor.
Line: 52
public function __construct( );
get_choices() static
Models that can be compared, from every configured provider.
Since: 4.5.1
Line: 64
static public function get_choices( ): array;
Returns: array — array<string, string>> Model names keyed by provider|model, grouped by provider name.
render()
Add the Compare models button after the AI provider setting.
Since: 4.5.1
Line: 87
public function render( $html, $args ): string;
| Type | Name | Description |
|---|---|---|
string |
$html |
HTML output. |
array |
$args |
Field arguments. |
Returns: string — Updated HTML output.
print_dialog()
Print the Compare models dialog.
Printed in the footer, outside the settings form, so pressing Enter never saves the settings.
Since: 4.5.1
Line: 105
public function print_dialog( ): void;
Returns: void
ajax_compare()
Answer a question with one model.
Since: 4.5.1
Line: 240
public function ajax_compare( ): void;
Returns: void