Example of prefix_allowed_tokens_fn() while text generation

Thank you so much for this answer, it is exactly what I‘ve been searching for!