Repository navigation
Conversation
|
Confirmed independently by running the real |
Thanks for independently validating this. I’ve added regression cases covering five emoji and a mixed ASCII/CJK/emoji string. Both distinguish character counting from the previous UTF-8 byte counting. Agreed that matching model-specific tokenizers is separate future work and out of scope for this fix. |
|
This pull request has been automatically marked as stale due to 90 days of inactivity. If this pull request is still relevant, please leave any comment (for example, "bump"), and we'll keep it open. Your contribution is very much appreciated — we're sorry we haven't been able to review it yet. |
|
Closing this pull request after a prolonged period of inactivity. If this is still relevant, please ask for it to be reopened. Thank you! |
Summary
estimate_tokensto count Unicode characters instead of UTF-8 bytes, matching thedocumented
ceil(chars / 4)heuristic.Test plan
cargo fmt --all && cargo clippy --all-targets && cargo testrtk proxy printf '你好\n'output inspected with an isolated trackingdatabase; input and output were each estimated as one token.