@@ -400,8 +400,8 @@ class InputFieldJSONSchemaExtra(BaseModel):
400
400
"""
401
401
402
402
input : Input
403
- orig_required : bool
404
403
field_kind : FieldKind
404
+ orig_required : bool = True
405
405
default : Optional [Any ] = None
406
406
orig_default : Optional [Any ] = None
407
407
ui_hidden : bool = False
@@ -498,7 +498,7 @@ def InputField(
498
498
input : Input = Input .Any ,
499
499
ui_type : Optional [UIType ] = None ,
500
500
ui_component : Optional [UIComponent ] = None ,
501
- ui_hidden : bool = False ,
501
+ ui_hidden : Optional [ bool ] = None ,
502
502
ui_order : Optional [int ] = None ,
503
503
ui_choice_labels : Optional [dict [str , str ]] = None ,
504
504
) -> Any :
@@ -534,15 +534,20 @@ def InputField(
534
534
535
535
json_schema_extra_ = InputFieldJSONSchemaExtra (
536
536
input = input ,
537
- ui_type = ui_type ,
538
- ui_component = ui_component ,
539
- ui_hidden = ui_hidden ,
540
- ui_order = ui_order ,
541
- ui_choice_labels = ui_choice_labels ,
542
537
field_kind = FieldKind .Input ,
543
- orig_required = True ,
544
538
)
545
539
540
+ if ui_type is not None :
541
+ json_schema_extra_ .ui_type = ui_type
542
+ if ui_component is not None :
543
+ json_schema_extra_ .ui_component = ui_component
544
+ if ui_hidden is not None :
545
+ json_schema_extra_ .ui_hidden = ui_hidden
546
+ if ui_order is not None :
547
+ json_schema_extra_ .ui_order = ui_order
548
+ if ui_choice_labels is not None :
549
+ json_schema_extra_ .ui_choice_labels = ui_choice_labels
550
+
546
551
"""
547
552
There is a conflict between the typing of invocation definitions and the typing of an invocation's
548
553
`invoke()` function.
@@ -614,7 +619,7 @@ def InputField(
614
619
615
620
return Field (
616
621
** provided_args ,
617
- json_schema_extra = json_schema_extra_ .model_dump (exclude_none = True ),
622
+ json_schema_extra = json_schema_extra_ .model_dump (exclude_unset = True ),
618
623
)
619
624
620
625
0 commit comments