WordPress\AiClient\Tools\DTO

FunctionResponse::getJsonSchemapublic staticWP 0.1.0

{@inheritDoc}

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

Хуков нет.

Возвращает

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

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

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

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

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

Код FunctionResponse::getJsonSchema() WP 7.0.4

public static function getJsonSchema(): array
{
    return ['type' => 'object', 'properties' => [self::KEY_ID => ['type' => 'string', 'description' => 'The ID of the function call this is responding to.'], self::KEY_NAME => ['type' => 'string', 'description' => 'The name of the function that was called.'], self::KEY_RESPONSE => ['type' => ['string', 'number', 'boolean', 'object', 'array', 'null'], 'description' => 'The response data from the function.']], 'anyOf' => [['required' => [self::KEY_RESPONSE, self::KEY_ID]], ['required' => [self::KEY_RESPONSE, self::KEY_NAME]]]];
}