openai / tiktoken

tiktoken is a fast BPE tokeniser for use with OpenAI's models.
MIT License
11.61k stars 785 forks source link

add __version__ attribute #191

Closed rasbt closed 11 months ago

rasbt commented 11 months ago

Adds a __version__, attribute, for instance:

In [1]: import tiktoken

In [2]: tiktoken.__version__
Out[2]: '0.5.0'

Tested it locally and it works on my machine.

Fixes #190

hauntsaninja commented 11 months ago

Thanks for the PR and the suggestion, but I have a couple nits:

So better to just hardcode it, which I could do for a future release :-)