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 int
getCompletionTokens()
Gets how many tokens the output used.int
getPromptTokens()
Gets how many tokens the input used.int
getTotalTokens()
Gets how many tokens in total.String
toString()
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.
-