Package com.azure.ai.openai.models
Class CompletionsUsage
java.lang.Object
com.azure.ai.openai.models.CompletionsUsage
Representation of the token counts processed for a completions request. Counts consider all tokens across prompts,
choices, choice alternates, best_of generations, and other consumers.
-
Method Summary
Modifier and TypeMethodDescriptionintGet the completionTokens property: The number of tokens generated across all completions emissions.intGet the promptTokens property: The number of tokens in the provided prompts for the completions request.intGet the totalTokens property: The total number of tokens processed for the completions request and response.
-
Method Details
-
getCompletionTokens
public int getCompletionTokens()Get the completionTokens property: The number of tokens generated across all completions emissions.- Returns:
- the completionTokens value.
-
getPromptTokens
public int getPromptTokens()Get the promptTokens property: The number of tokens in the provided prompts for the completions request.- Returns:
- the promptTokens value.
-
getTotalTokens
public int getTotalTokens()Get the totalTokens property: The total number of tokens processed for the completions request and response.- Returns:
- the totalTokens value.
-