Package nl.dannyj.mistral.models.usage
Class Usage
java.lang.Object
nl.dannyj.mistral.models.usage.Usage
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
The number of tokens used for the completion ("output tokens").int
The number of tokens used for the prompt ("input tokens").int
The total number of tokens used (prompt tokens + completion tokens).toString()
-
Constructor Details
-
Usage
public Usage(int promptTokens, int totalTokens, int completionTokens) -
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
-