feat: remove forced requirements for parameter

This commit is contained in:
Eduardo Chiarotti
2024-11-25 16:37:25 -03:00
parent 9c3843f925
commit 3b8ab25714

View File

@@ -163,16 +163,6 @@ class CrewStructuredTool:
f"not found in args_schema"
)
field = schema_fields[param_name]
if field.default == ... and field.default_factory is None:
# Parameter is required in both function and schema
continue
raise ValueError(
f"Function parameter '{param_name}' is required but has a "
f"default value in the schema"
)
def _parse_args(self, raw_args: Union[str, dict]) -> dict:
"""Parse and validate the input arguments against the schema.