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
Raising that class instead would let people like me catch it explicitly, and since it's a subclass of ValueError it should not break any existing code that currently catches ValueError directly.
The text was updated successfully, but these errors were encountered:
This code here:
tiktoken/tiktoken/core.py
Lines 375 to 383 in 39f29ce
I wanted to do something special on this exception in my own code, so I had to write this:
I suggest having a custom exception class for this instead:
Raising that class instead would let people like me catch it explicitly, and since it's a subclass of
ValueError
it should not break any existing code that currently catchesValueError
directly.The text was updated successfully, but these errors were encountered: