StoppingCriteria - do not include the last triggering token

Hi all,

I wrote a custom StoppingCriteria, which stops generation once a stop word is encountered, but the stop token is included in the generated text. Is there a way to flip a parameter somewhere not to include the stop word? Of course, I can post-process the generated text, but having this parameter would be nice :slight_smile:

Best,
Vladimir