Closed DrChristophFH closed 2 months ago
Can you make sure you are using the latest version of the lib? Which integration is this through?
Closing the issue due to the problem not reproducing on latest version. Please reopen if you see the issue persist.
Code used to reproduce:
def test_bug_report_leading_comma():
schema = {
"properties": {
"instructions": {
"type": "array",
"items": {
"type": "object",
"properties": {
"if": {
"type": "string"
},
"query": {
"type": "string"
}
}
}
}
},
"type": "object"
}
completion = """{"instructions": [
,{
"query": "..."
}]}"""
_test_json_schema_parsing_with_string(completion, schema, False)
It seems as if the model is still allowed to produce "," tokens at the beginning of array types like so:
schema
generated
which is not legal json.