From 3b8ab25714b9fbcb87d8fdbc34617f41625be51b Mon Sep 17 00:00:00 2001 From: Eduardo Chiarotti Date: Mon, 25 Nov 2024 16:37:25 -0300 Subject: [PATCH] feat: remove forced requirements for parameter --- src/crewai/tools/structured_tool.py | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/crewai/tools/structured_tool.py b/src/crewai/tools/structured_tool.py index bc97d3eda..d4d4b03f9 100644 --- a/src/crewai/tools/structured_tool.py +++ b/src/crewai/tools/structured_tool.py @@ -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.