mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-10 00:28:31 +00:00
Add more tests. Clean up docs. Improve conditional task
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
from typing import Callable, Any
|
||||
from typing import Any, Callable
|
||||
|
||||
from pydantic import Field
|
||||
|
||||
from crewai.task import Task
|
||||
from crewai.tasks.output_format import OutputFormat
|
||||
from crewai.tasks.task_output import TaskOutput
|
||||
|
||||
|
||||
@@ -37,3 +39,11 @@ class ConditionalTask(Task):
|
||||
if self.condition:
|
||||
return self.condition(context)
|
||||
return True
|
||||
|
||||
def get_skipped_task_output(self):
|
||||
return TaskOutput(
|
||||
description=self.description,
|
||||
raw="",
|
||||
agent=self.agent.role if self.agent else "",
|
||||
output_format=OutputFormat.RAW,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user