Interface TokenUsage

All Known Implementing Classes:
AskOutput

public interface TokenUsage
Contains data regarding the tokens that were used by a request to the Generic OAI API.
  • Method Summary

    Modifier and Type
    Method
    Description
    long
    Gets the number of input tokens that were used to process the prompt.
    long
    Gets the number of output tokens that were used to generate the response.
    long
    Gets the total number of tokens that were used to process the request.
  • Method Details

    • inputTokens

      long inputTokens()
      Gets the number of input tokens that were used to process the prompt.
      Returns:
      The number of input tokens.
    • outputTokens

      long outputTokens()
      Gets the number of output tokens that were used to generate the response.
      Returns:
      The number of output tokens.
    • totalTokens

      long totalTokens()
      Gets the total number of tokens that were used to process the request.
      Returns:
      The total number of tokens.