| Server IP : 68.178.247.200 / Your IP : 216.73.216.14 Web Server : Apache System : Linux p3plzcpnl489463.prod.phx3.secureserver.net 4.18.0-553.54.1.lve.el8.x86_64 #1 SMP Wed Jun 4 13:01:13 UTC 2025 x86_64 User : x9dppmxs4rgd ( 8559391) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/x9dppmxs4rgd/www/wp-includes/php-ai-client/src/Messages/DTO/ |
Upload File : |
<?php
declare (strict_types=1);
namespace WordPress\AiClient\Messages\DTO;
use WordPress\AiClient\Messages\Enums\MessageRoleEnum;
/**
* Represents a message from the AI model.
*
* This is a convenience class that automatically sets the role to MODEL.
* Model messages contain the AI's responses.
*
* Important: Do not rely on `instanceof ModelMessage` to determine the message role.
* This is merely a helper class for construction. Always use `$message->getRole()`
* to check the role of a message.
*
* @since 0.1.0
*/
class ModelMessage extends \WordPress\AiClient\Messages\DTO\Message
{
/**
* Constructor.
*
* @since 0.1.0
*
* @param MessagePart[] $parts The parts that make up this message.
*/
public function __construct(array $parts)
{
parent::__construct(MessageRoleEnum::model(), $parts);
}
}