Skip to content
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

Restore the ability to stop when a specified string has been generated #417

Closed
rlouf opened this issue Dec 8, 2023 · 2 comments · Fixed by #451
Closed

Restore the ability to stop when a specified string has been generated #417

rlouf opened this issue Dec 8, 2023 · 2 comments · Fixed by #451

Comments

@rlouf
Copy link
Member

rlouf commented Dec 8, 2023

This was removed in #366 to simplify the PR. It should be simple to implement it at the SequenceGenerator level.

@RobinPicard
Copy link
Contributor

I see how we could check whether all sequences contain the stop characters after last_state = next(states) in SequenceGenerator.__call__ but I can't find a way of ending the generation for a particular sequence if this one includes the stop characters (but not the others) without modifying the sequence_generator function. Do you have a solution in mind?

@rlouf
Copy link
Member Author

rlouf commented Dec 19, 2023

Can't we do this at the SequenceGenerator level?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants