WordPress\AiClient\Providers\Models\DTO
ModelMetadata::getJsonSchema
{@inheritDoc}
Method of the class: ModelMetadata{}
No Hooks.
Returns
null. Nothing (null).
Usage
$result = ModelMetadata::getJsonSchema(): array;
Changelog
| Since 0.1.0 | Introduced. |
ModelMetadata::getJsonSchema() ModelMetadata::getJsonSchema code WP 7.0
public static function getJsonSchema(): array
{
return ['type' => 'object', 'properties' => [self::KEY_ID => ['type' => 'string', 'description' => 'The model\'s unique identifier.'], self::KEY_NAME => ['type' => 'string', 'description' => 'The model\'s display name.'], self::KEY_SUPPORTED_CAPABILITIES => ['type' => 'array', 'items' => ['type' => 'string', 'enum' => CapabilityEnum::getValues()], 'description' => 'The model\'s supported capabilities.'], self::KEY_SUPPORTED_OPTIONS => ['type' => 'array', 'items' => \WordPress\AiClient\Providers\Models\DTO\SupportedOption::getJsonSchema(), 'description' => 'The model\'s supported configuration options.']], 'required' => [self::KEY_ID, self::KEY_NAME, self::KEY_SUPPORTED_CAPABILITIES, self::KEY_SUPPORTED_OPTIONS]];
}