File tree Expand file tree Collapse file tree 2 files changed +24
-18
lines changed Expand file tree Collapse file tree 2 files changed +24
-18
lines changed Original file line number Diff line number Diff line change @@ -3451,12 +3451,14 @@ def _GenerateVideosParameters_to_vertex(
3451
3451
3452
3452
3453
3453
def _FeatureSelectionPreference_to_mldev_enum_validate (enum_value : Any ) -> None :
3454
- if enum_value in set ([
3455
- 'FEATURE_SELECTION_PREFERENCE_UNSPECIFIED' ,
3456
- 'PRIORITIZE_QUALITY' ,
3457
- 'BALANCED' ,
3458
- 'PRIORITIZE_COST' ,
3459
- ]):
3454
+ if enum_value in set (
3455
+ [
3456
+ 'FEATURE_SELECTION_PREFERENCE_UNSPECIFIED' ,
3457
+ 'PRIORITIZE_QUALITY' ,
3458
+ 'BALANCED' ,
3459
+ 'PRIORITIZE_COST' ,
3460
+ ]
3461
+ ):
3460
3462
raise ValueError (f'{ enum_value } enum value is not supported in Gemini API.' )
3461
3463
3462
3464
Original file line number Diff line number Diff line change @@ -1623,22 +1623,26 @@ def raise_error_if_cannot_convert(
1623
1623
if field_value is None :
1624
1624
continue
1625
1625
if field_name not in google_schema_field_names :
1626
- raise ValueError ((
1627
- f'JSONSchema field "{ field_name } " is not supported by the '
1628
- 'Schema object. And the "raise_error_on_unsupported_field" '
1629
- 'argument is set to True. If you still want to convert '
1630
- 'it into the Schema object, please either remove the field '
1631
- f'"{ field_name } " from the JSONSchema object, or leave the '
1632
- '"raise_error_on_unsupported_field" unset.'
1633
- ))
1626
+ raise ValueError (
1627
+ (
1628
+ f'JSONSchema field "{ field_name } " is not supported by the '
1629
+ 'Schema object. And the "raise_error_on_unsupported_field" '
1630
+ 'argument is set to True. If you still want to convert '
1631
+ 'it into the Schema object, please either remove the field '
1632
+ f'"{ field_name } " from the JSONSchema object, or leave the '
1633
+ '"raise_error_on_unsupported_field" unset.'
1634
+ )
1635
+ )
1634
1636
if (
1635
1637
field_name in gemini_api_unsupported_field_names
1636
1638
and api_option == 'GEMINI_API'
1637
1639
):
1638
- raise ValueError ((
1639
- f'The "{ field_name } " field is not supported by the Schema '
1640
- 'object for GEMINI_API.'
1641
- ))
1640
+ raise ValueError (
1641
+ (
1642
+ f'The "{ field_name } " field is not supported by the Schema '
1643
+ 'object for GEMINI_API.'
1644
+ )
1645
+ )
1642
1646
1643
1647
def copy_schema_fields (
1644
1648
json_schema_dict : dict [str , Any ],
You can’t perform that action at this time.
0 commit comments