mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-10 00:28:31 +00:00
- Added a new `guardrails` field to the Task class to allow for multiple guardrail functions or string descriptions for output validation. - Implemented a model validator to ensure guardrails are processed correctly, supporting both callable functions and string descriptions. - Updated the task execution flow to invoke guardrails sequentially, handling validation and retry logic. - Added comprehensive tests for various guardrail scenarios, including sequential processing, validation failures, and mixed return types. This update improves the flexibility and robustness of task output validation, ensuring better control over task execution outcomes.
21 KiB
21 KiB