Skip to content

v1.8.1

Choose a tag to compare

@kgruiz kgruiz released this 22 Aug 03:06
· 9 commits to main since this release
  • Fixed CLI import error: Resolved ImportError: cannot import name 'GetModelForEncoding' when invoking tc/tokencount.

What's changed

  • core:
    • Added GetModelForEncoding (alias of GetModelForEncodingName).
    • Implemented GetModelMappings() to return an OrderedDict of model→encoding.
    • Exposed GetValidModels() and GetValidEncodings() for consumers.
  • version:
    • Bumped to 1.8.1.

Fixes

  • Ensures PyTokenCounter.__init__ exports align with core.py, restoring compatibility with the CLI and importers.