transformers
541cf67a - Map bare list, tuple and dict annotations to the right JSON schema type in get_json_schema (#49145)

Commit
12 days ago
Map bare list, tuple and dict annotations to the right JSON schema type in get_json_schema (#49145) * Map bare list, tuple and dict annotations to the right JSON schema type in get_json_schema * Deduplicate types in unions of basic types in get_json_schema list and tuple both map to "array", so a hint like list | tuple produced {"type": ["array", "array"]}. Duplicate type names are now dropped, and a union that collapses to a single type is emitted as a plain string.
Author
Parents
Loading