openai / tiktoken

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

add __version__ attribute #191

Closed rasbt closed 1 year ago

rasbt commented 1 year 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 1 year 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 :-)