-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Segmenter does not permit skipping long tokens #11
Comments
I see the following options (though I'm no super familiar with the code at this point):
Do you have a sense of which of these best supports your requirements? Also, pinging @abhinavdangeti and @sreekanth-cb |
I didn't see a good solution to this, so I ended up implementing my own wrapper around The reason this is safe in my program is that we already have the data in memory, so the maximum token size doesn't matter much to memory size, though I do truncate tokens to a maximum size. I still think it would be a good idea to make |
If the stream encounters a token that exceeds
maxTokenSize
, it appears the caller has no way of truncating or skipping the token: The error is final. There's no way to altermaxTokenSize
, either. As far as I can see, the only solution is to not useSegmenter
at all, but to write new streaming logic from scratch.The text was updated successfully, but these errors were encountered: