Package nl.dannyj.mistral.models.usage
Class Usage
java.lang.Object
nl.dannyj.mistral.models.usage.Usage
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintThe number of tokens used for the completion ("output tokens").intThe number of tokens used for the prompt ("input tokens").intThe total number of tokens used (prompt tokens + completion tokens).toString()
-
Constructor Details
-
Usage
public Usage(int promptTokens, int totalTokens, int completionTokens) Creates a newUsageinstance.- Parameters:
promptTokens- The number of tokens used for the prompt ("input tokens").totalTokens- The total number of tokens used (prompt tokens + completion tokens).completionTokens- The number of tokens used for the completion ("output tokens").
-
Usage
public Usage()
-
-
Method Details
-
getPromptTokens
public int getPromptTokens()The number of tokens used for the prompt ("input tokens").- Returns:
- the number of tokens used for the prompt
-
getTotalTokens
public int getTotalTokens()The total number of tokens used (prompt tokens + completion tokens).- Returns:
- the total number of tokens used
-
getCompletionTokens
public int getCompletionTokens()The number of tokens used for the completion ("output tokens").- Returns:
- the number of tokens used for the completion
-
toString
-