Skip to content

Commit 8244a14

Browse files
committed
Update task.py
1 parent 682fba3 commit 8244a14

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

src/controlflow/core/task.py

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,22 +117,29 @@ class Task(ControlFlowModel):
117117
)
118118
agents: list["Agent"] = Field(
119119
None,
120-
description="The agents assigned to the task. If not provided, agents will be inferred from the parent task, flow, or global default.",
120+
description="The agents assigned to the task. If not provided, agents "
121+
"will be inferred from the parent task, flow, or global default.",
121122
)
122123
context: dict = Field(
123124
default_factory=dict,
124-
description="Additional context for the task. If tasks are provided as context, they are automatically added as `depends_on`",
125+
description="Additional context for the task. If tasks are provided as "
126+
"context, they are automatically added as `depends_on`",
125127
)
126128
subtasks: list["Task"] = Field(
127129
default_factory=list,
128-
description="A list of subtasks that are part of this task. Subtasks are considered dependencies, though they may be skipped.",
130+
description="A list of subtasks that are part of this task. Subtasks are "
131+
"considered dependencies, though they may be skipped.",
129132
)
130133
depends_on: list["Task"] = Field(
131134
default_factory=list, description="Tasks that this task depends on explicitly."
132135
)
133136
status: TaskStatus = TaskStatus.INCOMPLETE
134137
result: T = None
135-
result_type: Union[type[T], GenericAlias, _LiteralGenericAlias, None] = None
138+
result_type: Union[type[T], GenericAlias, _LiteralGenericAlias, None] = Field(
139+
None,
140+
description="The expected type of the result. This should be a type"
141+
", generic alias, BaseModel subclass, pd.DataFrame, or pd.Series.",
142+
)
136143
error: Union[str, None] = None
137144
tools: list[ToolType] = []
138145
user_access: bool = False

0 commit comments

Comments
 (0)