Class CompletionsUsage

java.lang.Object
com.azure.ai.openai.models.CompletionsUsage

public final class CompletionsUsage extends Object
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 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.