In the module 2 notes called DLAI-crewai-M2-final.pdf and the videos covering hooks please ensure that the below info is updated.
There is no more pre_hooks or post_hooks in the Task, just callbacks are available now. These pages in the shared class notes need to be updated.
crewai: 1.7.2
crewai_tools: 1.7.2
class Task(
*,
used_tools: int = 0,
tools_errors: int = 0,
delegations: int = 0,
i18n: I18N = get_i18n,
name: str | None = None,
prompt_context: str | None = None,
description: str,
expected_output: str,
config: dict[str, Any] | None = None,
callback: Any | None = None,
agent: BaseAgent | None = None,
context: list[Task] | _NotSpecified | None = NOT_SPECIFIED,
async_execution: bool | None = False,
output_json: type[BaseModel] | None = None,
output_pydantic: type[BaseModel] | None = None,
response_model: type[BaseModel] | None = None,
output_file: str | None = None,
create_directory: bool | None = True,
output: TaskOutput | None = None,
tools: list[BaseTool] | None = list,
security_config: SecurityConfig = SecurityConfig,
id: UUID = uuid.uuid4,
human_input: bool | None = False,
markdown: bool | None = False,
converter_cls: type[Converter] | None = None,
processed_by_agents: set[str] = set,
guardrail: GuardrailType | None = None,
guardrails: GuardrailsType | None = None,
max_retries: int | None = None,
guardrail_max_retries: int = 3,
retry_count: int = 0,
start_time: datetime | None = None,
end_time: datetime | None = None,
allow_crewai_trigger_context: bool | None = None
)
