WordPress\AiClient\Results\DTO

Candidate::__constructpublicWP 0.1.0

Constructor.

Method of the class: Candidate{}

No Hooks.

Returns

null. Nothing (null).

Usage

$Candidate = new Candidate();
$Candidate->__construct( $message, $finishReason );
$message(Message) (required)
The generated message.
$finishReason(FinishReasonEnum) (required)
The reason generation stopped.

Changelog

Since 0.1.0 Introduced.

Candidate::__construct() code WP 7.0

public function __construct(Message $message, FinishReasonEnum $finishReason)
{
    if (!$message->getRole()->isModel()) {
        throw new InvalidArgumentException('Message must be a model message.');
    }
    $this->message = $message;
    $this->finishReason = $finishReason;
}