Constructor.
Parameters
$roleWordPressAiClientMessagesEnumsMessageRoleEnumrequired- The role of the message sender.
$partsWordPressAiClientMessagesDTOMessagePart[]required- The parts that make up this message.
Source
public function __construct(MessageRoleEnum $role, array $parts)
{
$this->role = $role;
$this->parts = $parts;
$this->validateParts();
}
Changelog
| Version | Description |
|---|---|
| 0.1.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.