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
The behavior of the compiler when additionalProperties is set is inconsistent. For instance the following will not compile:
importjsonfromoutlines_core.fsm.json_schemaimportbuild_regex_from_schemaschema= {
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "#languagemap",
"type": "object",
"patternProperties": {
"^(yes|no)$": {
"type": "string"
}
},
"additionalProperties": False
}
regex_str=build_regex_from_schema(json.dumps(schema))
# ValueError: Unsupported JSON Schema structure false # Make sure it is valid to the JSON Schema specification and check if it's supported by Outlines.# If it should be supported, please open an issue.
But it compiles when setting additionalProperties to True:
The behavior of the compiler when
additionalProperties
is set is inconsistent. For instance the following will not compile:But it compiles when setting
additionalProperties
toTrue
:And compiles when
additionalProperties
is set toFalse
but we replacepatternProperties
with regularproperties
:The text was updated successfully, but these errors were encountered: