fabricatio_digest.capabilities.digest

Module for the Digest class, which generates task lists based on requirements.

Classes

Digest

A class that generates a task list based on a requirement.

Module Contents

class fabricatio_digest.capabilities.digest.Digest(/, **data: Any)

Bases: fabricatio_core.capabilities.propose.Propose, abc.ABC

A class that generates a task list based on a requirement.

async digest(requirement: str, receptions: Set[fabricatio_core.models.role.RoleName], **kwargs: Unpack[fabricatio_core.models.kwargs_types.ValidateKwargs[fabricatio_digest.models.tasklist.TaskList | None]]) fabricatio_digest.models.tasklist.TaskList | None

Generate a task list based on the given requirement and receptions.

This method utilizes a template to construct instructions for creating a sequence of tasks that fulfill the specified requirement, considering the provided receptions.

Parameters:
  • requirement (str) – A string describing the requirement to be fulfilled.

  • receptions (Set[RoleName]) – A set of role names indicating the roles

  • **kwargs (Unpack[ValidateKwargs[Optional[TaskList]]]) – Additional keyword arguments for validation and configuration.

Returns:

A TaskList object containing the generated tasks if

successful, or None if task generation fails.

Return type:

Optional[TaskList]