Skip to content

Conversation

Raymond112514
Copy link
Contributor

After running the script check_func_format.py in utils, the error type descriptions are as follows:

There are 1202 errors
Error Types with Counts:
Error id: 15 --- The parameter '{param_name}' is an optional parameter and should have a 'default' field with the default value in the correct type.
Count: 859.0
------------------------------------------------------------------------------------------
Error id: 37 --- The default value {repr(param_details['default'])} for the parameter '{param_name}' is not of type {param_details['type']}. Expected {TYPE_MAP[param_details['type']]}, got {type(param_details['default'])}.
Count: 120.0
------------------------------------------------------------------------------------------
Error id: 36 --- The enum value {repr(enum_value)} is not of type {param_details['type']}. Expected {TYPE_MAP[param_details['type']]}, got {type(enum_value)}.
Count: 102.0
------------------------------------------------------------------------------------------
Error id: 21 --- The parameter '{param_name}' should contain a field 'description' with a description of the parameter.
Count: 81.0
------------------------------------------------------------------------------------------
Error id: 14 --- The parameter '{param_name}' is a required parameter and should not have a 'default' field.
Count: 18.0
------------------------------------------------------------------------------------------
Error id: 27 --- The parameter '{param_name}' is of type 'dict' and should contain either 'properties' or 'additionalProperties' field to specify the sub-parameters details.
Count: 15.0
------------------------------------------------------------------------------------------
Error id: 10 --- Function 'parameters' field must only contain 'type', 'properties', and 'required' fields. Any other fields should be removed.
Count: 7.0
------------------------------------------------------------------------------------------

This PR attempts to fix all errors. The current version manually addresses types 10 and 14.

Error type 10:

  • multiple_150, parallel_168, simple_128, parallel_multiple_15, parallel_multiple_30: removed optional field from parameter
  • irrelevance_111, irrelevance_153: removed default field from parameter

Error type 14

  • for all entries, removed the parameter name from the default list.

@Raymond112514
Copy link
Contributor Author

Update: fixed error type 36 and 37

There are 964 errors
Error Types with Counts:
Error id: 15 --- The parameter '{param_name}' is an optional parameter and should have a 'default' field with the default value in the correct type.
Count: 868.0
------------------------------------------------------------------------------------------
Error id: 21 --- The parameter '{param_name}' should contain a field 'description' with a description of the parameter.
Count: 81.0
------------------------------------------------------------------------------------------
Error id: 27 --- The parameter '{param_name}' is of type 'dict' and should contain either 'properties' or 'additionalProperties' field to specify the sub-parameters details.
Count: 15.0
------------------------------------------------------------------------------------------

Both error type is fixed by running the resolve_error_type_36.py and resolve_error_type_37.py. A few cases are resolved manually.

Error type 36:

  • live_irrelevance_655-207-0: updated true/false to True/False
  • live_irrelevance_712-236-0, live_multiple_911-190-0: changed parameter professional_group_id type from integer to string (since the enum contains "Group A", "Group B",...)

Error type 37:

  • irrelevance_75: changed parameter period from “5 years” to 5
  • irrelevance_189: changed parameter year from “current year” to 2025
  • live_irrelevance_7-0-7: changed parameter auth type from tuple to array

@HuanzhiMao HuanzhiMao added the BFCL-Dataset BFCL Dataset-Related Issue label Jan 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BFCL-Dataset BFCL Dataset-Related Issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants