Interface TokenUsage.Builder

  • Method Details

    • inputTokens

      TokenUsage.Builder inputTokens(Integer 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.

      Parameters:
      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.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • outputTokens

      TokenUsage.Builder outputTokens(Integer 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.

      Parameters:
      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.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • totalTokens

      TokenUsage.Builder totalTokens(Integer 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.

      Parameters:
      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.
      Returns:
      Returns a reference to this object so that method calls can be chained together.