Skip to content

Enhance documentation for TaskDefinition #534

@lsg551

Description

@lsg551

This is the latest implementation of the TaskDefinition model:

class TaskDefinition(BaseModel):
"""
The definition and state of a task.
Attributes:
input (str):
The task input.
session_id (str):
The session ID that the task belongs to.
task_id (str):
The task ID. Defaults to a random UUID.
service_id (str):
The service ID that the task should be sent to.
If blank, the orchestrator decides.
"""
input: str
task_id: str = Field(default_factory=generate_id)
session_id: str | None = None
service_id: str | None = None

The description for input appears very confusing to me. input (str): The task input. suggests being a regular string (i.e., query to a workflow), but apparently it is actually expecting a JSON encoded string.

From this description alone, I could not deduce what it does or expects. Correct me if I'm wrong – is this just the serialized input that is eventually processed by a workflow's run method?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions