-
Couldn't load subscription status.
- Fork 9
Closed
Description
Thanks for implementing token count logic in Java, this is very helpful!
I found a few cases in which the count calculated was different from the actual OpenAI count. While I know this is an estimation, it would be good if you could check the logic.
- When an integer enum is passed as a function parameter, 1 less token is counted.
- When the message contains role
assistantwithtool_callsand a subsequent message with roletool, 6 extra tokens are counted.
If you want, I can provide examples for the above.
Thanks!
forestwanglin
Metadata
Metadata
Assignees
Labels
No labels