Skip to content

Commit

Permalink
修改tool_eval参数和manifests参数匹配检测方法 (#622)
Browse files Browse the repository at this point in the history
* create_output变更为classmethod方法,component_tool_eval_schemas移动到case中

* create_output变更为classmethod方法,component_tool_eval_schemas移动到case中

* create_output变更为classmethod方法,component_tool_eval_schemas移动到case中

* create_output变更为classmethod方法,component_tool_eval_schemas移动到case中

* 修改tool_eval和manifests参数校验规则

---------

Co-authored-by: yepeiwen01 <[email protected]>
  • Loading branch information
peiwenYe and yepeiwen01 authored Nov 27, 2024
1 parent 4134c33 commit f95ca56
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion python/tests/component_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ def check(self, component_cls) -> CheckInfo:
raise ValueError("No manifests found")
manifest = manifests[0]
properties = manifest['parameters']['properties']
manifest_var = properties.keys()
required_params = []
anyOf = manifest['parameters'].get('anyOf', None)
required_exists = False
Expand Down Expand Up @@ -179,7 +180,7 @@ def check(self, component_cls) -> CheckInfo:
if param_name == 'kwargs' or param_name == 'args' or param_name == 'self':
continue
tool_eval_input_params.append(param_name)
if param_name not in required_params:
if param_name not in manifest_var:
check_pass_flag = False
ileagal_params.append(param_name)

Expand Down

0 comments on commit f95ca56

Please sign in to comment.