Skip to content

Commit 1f5ef18

Browse files
wangliang181230liuruibin
authored andcommitted
fix: Fix an exception where incomplete parameters were generated by a large model when calling the Workflow Tool in the ai-chat node, resulting in missing parameters being thrown
1 parent 487ea43 commit 1f5ef18

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

apps/application/flow/tools.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1031,7 +1031,10 @@ def get_workflow_args(tool, qv):
10311031
input_field_list = node.get("properties").get("user_input_field_list")
10321032
return build_schema(
10331033
{
1034-
field.get("field"): (get_type(field.get("type")), Field(..., description=field.get("desc")))
1034+
field.get("field"): (
1035+
get_type(field.get("type")),
1036+
Field(..., required=True, description=field.get("desc")) if field.get("is_required") else Field(default=None, required=False, description=field.get("desc"))
1037+
)
10351038
for field in input_field_list
10361039
}
10371040
)

0 commit comments

Comments
 (0)