Package com.chatmotorapi.api
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 Summary
Modifier and Type Method Description intgetCompletionTokens()Gets how many tokens the output used.intgetPromptTokens()Gets how many tokens the input used.intgetTotalTokens()Gets how many tokens in total.StringtoString()Provides a string representation of this object.
-
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
Provides a string representation of this object. The output includes the class name along with key attribute values.
-