Interface OpenAIChatResponse.Usage
-
- Enclosing interface:
- OpenAIChatResponse
public static interface OpenAIChatResponse.UsageRepresents the usage of the chat completion API.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intgetCompletionTokens()Gets the number of tokens used for the completion.intgetPromptTokens()Gets the number of tokens used for the prompt.intgetTotalTokens()Gets the total number of tokens used.
-
-
-
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
-
-