about tokens
May I ask if it is possible to add the number of tokens returned by chatGPT, which can facilitate the counting of the number of tokens I have already used and avoid exceeding the token length and causing errors
(CompletionResult) completion.getUsage() .getPromptTokens() or .getCompletionTokens() or .getTotalTokens()
I am using OpenAiService. streamChatCompletion(), which returns ChatCompletionChunk without statistics on tokens
Understood. Maybe clarify issue name as a feature request? Thx.
@Crow9527
Currently the streaming OpenAi API does not return any statistics on tokens.
(CompletionResult) completion.getUsage().getTotalTokens()