You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: add message token counting, encoding factory, and expanded model support (#31)
- Add ChatMessage type and Encoder.CountMessageTokens() for OpenAI chat
message token counting using the official formula (3 tokens/message
overhead + 3 reply priming)
- Add TikTokenEncoder.CreateForEncoding() for string-based encoding lookup
- Add ModelToEncoding.ForEncoding()/TryForEncoding() methods
- Expand Models constants: O3, O3Mini, O1, O1Mini, Gpt4oMini, Gpt4Turbo
- Bundle p50k/r50k encodings in the Tiktoken meta-package
- Add 10 new tests (50 total)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
0 commit comments