WordPress\AiClient\Tools\DTO

FunctionDeclaration::getJsonSchemapublic staticWP 0.1.0

{@inheritDoc}

Method of the class: FunctionDeclaration{}

No Hooks.

Returns

null. Nothing (null).

Usage

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

Changelog

Since 0.1.0 Introduced.

FunctionDeclaration::getJsonSchema() code WP 7.0

public static function getJsonSchema(): array
{
    return ['type' => 'object', 'properties' => [self::KEY_NAME => ['type' => 'string', 'description' => 'The name of the function.'], self::KEY_DESCRIPTION => ['type' => 'string', 'description' => 'A description of what the function does.'], self::KEY_PARAMETERS => ['type' => 'object', 'description' => 'The JSON schema for the function parameters.', 'additionalProperties' => \true]], 'required' => [self::KEY_NAME, self::KEY_DESCRIPTION]];
}