mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-11 00:58:30 +00:00
added docs and tests
This commit is contained in:
@@ -660,7 +660,7 @@ class Crew(BaseModel):
|
||||
previous_output
|
||||
):
|
||||
self._logger.log(
|
||||
"info",
|
||||
"debug",
|
||||
f"Skipping conditional task: {task.description}",
|
||||
color="yellow",
|
||||
)
|
||||
@@ -670,6 +670,7 @@ class Crew(BaseModel):
|
||||
agent=task.agent.role if task.agent else "",
|
||||
output_format=OutputFormat.RAW,
|
||||
)
|
||||
|
||||
if not was_replayed:
|
||||
self._store_execution_log(
|
||||
task,
|
||||
|
||||
@@ -18,11 +18,10 @@ class ConditionalTask(Task):
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
*args,
|
||||
condition: Callable[[Any], bool],
|
||||
**kwargs,
|
||||
):
|
||||
super().__init__(*args, **kwargs)
|
||||
super().__init__(**kwargs)
|
||||
self.condition = condition
|
||||
|
||||
def should_execute(self, context: TaskOutput) -> bool:
|
||||
|
||||
Reference in New Issue
Block a user