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

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      long inputTokens()
      Gets the number of input tokens that were used to process the prompt.
      long outputTokens()
      Gets the number of output tokens that were used to generate the response.
      long totalTokens()
      Gets the total number of tokens that were used to process the request.
    • Method Detail

      • 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.