azad.predefined_tools.task_entry Module¶
azad.predefined_tools.task_entry ¶
Predefined Task Entry Tool Schema and Metadata.
Attributes¶
TASK_ENTRY_TOOL_METADATA
module-attribute
¶
TASK_ENTRY_TOOL_METADATA = {'name': 'task_entry', 'description': 'Creates a new nested task in the mindmap structure', 'requires_approval': True, 'parameters': {'initial_task_config': {'description': 'Configuration for the new nested task', 'streamable': False}, 'task_description': {'description': 'Description of the task and initial context', 'streamable': False}}, 'required_parameters': ['initial_task_config', 'task_description'], 'examples': [{'explanation': 'Create a nested task with a specific configuration', 'parameters': {'initial_task_config': {'model_name': 'gpt-4', 'tool_metadata': [], 'dialect_name': 'xml', 'dialect_options': {}}, 'task_description': [{'type': 'text', 'text': 'Analyze this code snippet'}]}}], 'is_task_entry': True, 'is_task_exit': False, 'task_lifecycle_output_keypairs': {'initial_task_config': TASK_CONFIG, 'task_description': TASK_DESCRIPTION}}
Classes¶
TaskEntryToolSchema ¶
Bases: BaseModel
Input schema for the Task Entry tool.
This defines the required parameters when creating a new nested task.
Attributes¶
initial_task_config
class-attribute
instance-attribute
¶
initial_task_config: TaskConfigPart = Field(..., description='Configuration for the new nested task including model, tools, and dialect')
task_description
class-attribute
instance-attribute
¶
task_description: List[Union[TextPart, ImagePart, InformationalPart]] = Field(..., description='Description of the task and initial context to be provided to the nested task')
Functions¶
validate_task_description ¶
validate_task_description() -> TaskEntryToolSchema
Validate that task_description contains at least one content part.
Source code in azad/predefined_tools/task_entry.py
to_tool_result ¶
Convert to format expected by mindmap's add_task_entry method.
from_task_config
classmethod
¶
from_task_config(task_config: TaskConfigPart, task_description: List[Union[TextPart, ImagePart, InformationalPart]]) -> TaskEntryToolSchema
Create a TaskEntryToolSchema from a TaskConfigPart and task description.
Source code in azad/predefined_tools/task_entry.py
TaskEntryOutputSchema ¶
Bases: BaseModel
Output schema for the Task Entry tool.
This defines the structure of the result returned when a nested task is created.
Attributes¶
task_description
class-attribute
instance-attribute
¶
task_description: List[Union[TextPart, ImagePart, InformationalPart]] = Field(..., description='The task description that was used to create the nested task')
initial_task_config
class-attribute
instance-attribute
¶
initial_task_config: TaskConfigPart = Field(..., description='The configuration that was used for the nested task')