Skip to content

/AWS1/CL_BDCTOKENUSAGE

The token consumption statistics for language model operations during evaluation. Provides detailed breakdown of input, output, and total tokens used for cost tracking and performance monitoring.

CONSTRUCTOR

IMPORTING

Optional arguments:

iv_inputtokens TYPE /AWS1/BDCINTEGER /AWS1/BDCINTEGER

The number of tokens consumed for input processing during the evaluation. Includes tokens from the evaluation prompt, agent traces, and any additional context provided to the evaluator model.

iv_outputtokens TYPE /AWS1/BDCINTEGER /AWS1/BDCINTEGER

The number of tokens generated by the evaluator model in its response. Includes tokens for the score, explanation, and any additional output produced during the evaluation process.

iv_totaltokens TYPE /AWS1/BDCINTEGER /AWS1/BDCINTEGER

The total number of tokens consumed during the evaluation, calculated as the sum of input and output tokens. Used for cost calculation and rate limiting within the service limits.


Queryable Attributes

inputTokens

The number of tokens consumed for input processing during the evaluation. Includes tokens from the evaluation prompt, agent traces, and any additional context provided to the evaluator model.

Accessible with the following methods

Method Description
GET_INPUTTOKENS() Getter for INPUTTOKENS, with configurable default
ASK_INPUTTOKENS() Getter for INPUTTOKENS w/ exceptions if field has no value
HAS_INPUTTOKENS() Determine if INPUTTOKENS has a value

outputTokens

The number of tokens generated by the evaluator model in its response. Includes tokens for the score, explanation, and any additional output produced during the evaluation process.

Accessible with the following methods

Method Description
GET_OUTPUTTOKENS() Getter for OUTPUTTOKENS, with configurable default
ASK_OUTPUTTOKENS() Getter for OUTPUTTOKENS w/ exceptions if field has no value
HAS_OUTPUTTOKENS() Determine if OUTPUTTOKENS has a value

totalTokens

The total number of tokens consumed during the evaluation, calculated as the sum of input and output tokens. Used for cost calculation and rate limiting within the service limits.

Accessible with the following methods

Method Description
GET_TOTALTOKENS() Getter for TOTALTOKENS, with configurable default
ASK_TOTALTOKENS() Getter for TOTALTOKENS w/ exceptions if field has no value
HAS_TOTALTOKENS() Determine if TOTALTOKENS has a value