Skip to content

Commit 64c0086

Browse files
fix test_guided_json_object
1 parent 8022c7a commit 64c0086

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tests/entrypoints/llm/test_guided_generate.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,9 @@ def test_guided_json_object(llm, guided_decoding_backend: str,
381381

382382
# Parse to verify it is valid JSON
383383
parsed_json = json.loads(generated_text)
384-
assert isinstance(parsed_json, dict)
384+
# A list is not what was intended, but is still valid
385+
# json.
386+
assert isinstance(parsed_json, (dict, list))
385387

386388

387389
class CarType(str, Enum):

0 commit comments

Comments
 (0)