WordPress\AiClient\Messages\DTO
Message::getJsonSchema
{@inheritDoc}
Method of the class: Message{}
No Hooks.
Returns
null. Nothing (null).
Usage
$result = Message::getJsonSchema(): array;
Changelog
| Since 0.1.0 | Introduced. |
Message::getJsonSchema() Message::getJsonSchema code WP 7.0
public static function getJsonSchema(): array
{
return ['type' => 'object', 'properties' => [self::KEY_ROLE => ['type' => 'string', 'enum' => MessageRoleEnum::getValues(), 'description' => 'The role of the message sender.'], self::KEY_PARTS => ['type' => 'array', 'items' => \WordPress\AiClient\Messages\DTO\MessagePart::getJsonSchema(), 'minItems' => 1, 'description' => 'The parts that make up this message.']], 'required' => [self::KEY_ROLE, self::KEY_PARTS]];
}