You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi! When I use json schema in outlines that has regex pattern inside a string type, it tries to run interegular.parse_pattern(regex_string) and fails with Unsupported: '^'. It happens when regex pattern inside string has ^ or $.
Also, it seems we wrap the pattern inside ^ and $ with double quotes. This would convert ^\d{5}$ to ^"\d{5}"$ . We can let the user decide if its string or numbers?
Describe the issue as clearly as possible:
Hi! When I use json schema in outlines that has regex pattern inside a string type, it tries to run
interegular.parse_pattern(regex_string)
and fails withUnsupported: '^'
. It happens when regex pattern inside string has^
or$
.Example json schema
This seems like a limitation of interegular but Outlines supports pattern within string type so was wondering if regex pattern in json schema is really supported or not?
Also, it seems we wrap the pattern inside ^ and $ with double quotes. This would convert
^\d{5}$
to^"\d{5}"$
. We can let the user decide if its string or numbers?cc: @lapp0
Steps/code to reproduce the bug:
Expected result:
Error message:
Unsupported: '^'
Outlines/Python version information:
Version information
Context for the issue:
No response
The text was updated successfully, but these errors were encountered: