WordPress\AiClient\Results\DTO

TokenUsage::getJsonSchemapublic staticWP 0.1.0

{@inheritDoc}

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

Хуков нет.

Возвращает

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

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

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

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

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

Код TokenUsage::getJsonSchema() WP 7.0.4

public static function getJsonSchema(): array
{
    return ['type' => 'object', 'properties' => [self::KEY_PROMPT_TOKENS => ['type' => 'integer', 'description' => 'Number of tokens in the prompt.'], self::KEY_COMPLETION_TOKENS => ['type' => 'integer', 'description' => 'Number of tokens in the completion, including any thought tokens.'], self::KEY_TOTAL_TOKENS => ['type' => 'integer', 'description' => 'Total number of tokens used.'], self::KEY_THOUGHT_TOKENS => ['type' => 'integer', 'description' => 'Number of tokens used for thinking, as a subset of completion tokens.']], 'required' => [self::KEY_PROMPT_TOKENS, self::KEY_COMPLETION_TOKENS, self::KEY_TOTAL_TOKENS]];
}