Interface OpenAIChatResponse.Usage

  • Enclosing interface:
    OpenAIChatResponse

    public static interface OpenAIChatResponse.Usage
    Represents the usage of the chat completion API.
    • Method Detail

      • getPromptTokens

        int getPromptTokens()
        Gets the number of tokens used for the prompt.
        Returns:
        the number of tokens used for the prompt
      • getCompletionTokens

        int getCompletionTokens()
        Gets the number of tokens used for the completion.
        Returns:
        the number of tokens used for the completion
      • getTotalTokens

        int getTotalTokens()
        Gets the total number of tokens used.
        Returns:
        the total number of tokens used