Recent

Model_CompareclassPro only

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\Knowledge_Base\Pro\AI
Since: 3.2.0
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: 3.2.0
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: 3.2.0
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 the Compare models dialog.

Printed in the footer, outside the settings form, so pressing Enter never saves the settings.

Since: 3.2.0
Line: 105

public function print_dialog(  ): void;

Returns: void

ajax_compare()

Answer a question with one model.

Since: 3.2.0
Line: 240

public function ajax_compare(  ): void;

Returns: void