-
Notifications
You must be signed in to change notification settings - Fork 399
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
Add outlines.generate.fsm() API entrypoint #699
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please review the test cases tests/fsm/test_fsm.py
and introduce test cases for this new method?
It's probably sufficient to simply verify that RegexFSM.from_interegular_fsm(interegular.parse_pattern(pattern)) == RegexFSM(pattern)
for a few pattern
s.
I added a type correction, using the cache, |
Would you mind rebasing your branch on |
213d91d
to
0a440c0
Compare
0a440c0
to
8209b6c
Compare
@rlouf Done. According to #670 (comment), What do you think @lapp0? |
@miftahmoha yes, we should document those use cases. This perfectly solves those problems. Use a pattern but disallow certain keywords. Example: A list of strings, but none of those strings can be "pink" or "elephant"
If you're talking about implementing |
64a358f
to
0beb5de
Compare
0beb5de
to
b12b8db
Compare
Thank you so much for the valuable addition @miftahmoha ! |
This adds the outlines.generate.fsm() API entrypoint following #670.
Pre-commit:
Tests: