Class MotorCompletionUsage

java.lang.Object
com.chatmotorapi.api.MotorCompletionUsage

public class MotorCompletionUsage
extends Object
Provides information about how many tokens were used by your API request.
  • Method Details

    • getPromptTokens

      public int getPromptTokens()
      Gets how many tokens the input used. Will return 0 if the API edition is not Pro.
      Returns:
      how many tokens the input used.
    • getCompletionTokens

      public int getCompletionTokens()
      Gets how many tokens the output used. Will return 0 if the API edition is not Pro.
      Returns:
      how many tokens the output used.
    • getTotalTokens

      public int getTotalTokens()
      Gets how many tokens in total.
      Returns:
      the total number of tokens used.
    • toString

      public String toString()
      Provides a string representation of this object. The output includes the class name along with key attribute values.
      Overrides:
      toString in class Object
      Returns:
      a string description of this object.