Update lib/crewai/src/crewai/utilities/pydantic_schema_utils.py

Co-authored-by: Gabe Milani <gabriel@crewai.com>
This commit is contained in:
Lucas Gomide
2026-02-25 10:04:10 -05:00
committed by GitHub
parent 18acf6dffd
commit a70af77893

View File

@@ -431,9 +431,8 @@ def generate_model_description(
Args:
model: A Pydantic model class.
strip_null_types: When ``True`` (default), remove ``null`` from
``anyOf`` / ``type`` arrays. Set to ``False`` for **tool
parameter** schemas so that the LLM can send ``null`` for
optional fields instead of being forced to guess a value.
``anyOf`` / ``type`` arrays. Set to ``False`` to allow sending ``null`` for
optional fields.
Returns:
A ModelDescription with JSON schema representation of the model.