WordPress\AiClient\Tools\DTO

FunctionCall::getJsonSchemapublic staticWP 0.1.0

{@inheritDoc}

Method of the class: FunctionCall{}

No Hooks.

Returns

null. Nothing (null).

Usage

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

Changelog

Since 0.1.0 Introduced.

FunctionCall::getJsonSchema() code WP 7.0

public static function getJsonSchema(): array
{
    return ['type' => 'object', 'properties' => [self::KEY_ID => ['type' => 'string', 'description' => 'Unique identifier for this function call.'], self::KEY_NAME => ['type' => 'string', 'description' => 'The name of the function to call.'], self::KEY_ARGS => ['type' => ['string', 'number', 'boolean', 'object', 'array', 'null'], 'description' => 'The arguments to pass to the function.']], 'anyOf' => [['required' => [self::KEY_ID]], ['required' => [self::KEY_NAME]]]];
}