WordPress\AiClient\Messages\DTO

Message::getJsonSchemapublic staticWP 0.1.0

{@inheritDoc}

Метод класса: Message{}

Хуков нет.

Возвращает

null. Ничего (null).

Использование

$result = Message::getJsonSchema(): array;

Список изменений

С версии 0.1.0 Введена.

Код Message::getJsonSchema() WP 7.0.4

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]];
}