Skip to content

tasks

Class info

Classes

Name Children Inherits
ChainAbortedError
llmling_agent.tasks.exceptions
Agent chain was aborted by user.
    JobError
    llmling_agent.tasks.exceptions
    General task-related exception.
    JobRegistrationError
    llmling_agent.tasks.exceptions
    Task could not get registered.
      RunAbortedError
      llmling_agent.tasks.exceptions
      Run was aborted by user.
        TaskRegistry
        llmling_agent.tasks.registry
        Registry for managing tasks.
          ToolSkippedError
          llmling_agent.tasks.exceptions
          Tool execution was skipped by user.

            🛈 DocStrings

            Task management.

            ChainAbortedError

            Bases: JobError

            Agent chain was aborted by user.

            Source code in src/llmling_agent/tasks/exceptions.py
            18
            19
            class ChainAbortedError(JobError):
                """Agent chain was aborted by user."""
            

            JobError

            Bases: LLMLingError

            General task-related exception.

            Source code in src/llmling_agent/tasks/exceptions.py
            6
            7
            class JobError(LLMLingError):
                """General task-related exception."""
            

            JobRegistrationError

            Bases: JobError

            Task could not get registered.

            Source code in src/llmling_agent/tasks/exceptions.py
            22
            23
            class JobRegistrationError(JobError):
                """Task could not get registered."""
            

            RunAbortedError

            Bases: JobError

            Run was aborted by user.

            Source code in src/llmling_agent/tasks/exceptions.py
            14
            15
            class RunAbortedError(JobError):
                """Run was aborted by user."""
            

            TaskRegistry

            Bases: BaseRegistry[str, Job[Any, Any]]

            Registry for managing tasks.

            Source code in src/llmling_agent/tasks/registry.py
            13
            14
            15
            16
            17
            18
            19
            20
            21
            22
            23
            24
            25
            26
            27
            28
            29
            30
            31
            32
            class TaskRegistry(BaseRegistry[str, Job[Any, Any]]):
                """Registry for managing tasks."""
            
                @property
                def _error_class(self) -> type[JobRegistrationError]:
                    return JobRegistrationError
            
                def _validate_item(self, item: Any) -> Job[Any, Any]:
                    if not isinstance(item, Job):
                        msg = f"Expected Job, got {type(item)}"
                        raise self._error_class(msg)
                    return item
            
                def register(self, name: str, task: Job[Any, Any], replace: bool = False):
                    """Register a task with name.
            
                    Creates a copy of the task with the name set.
                    """
                    task_copy = task.model_copy(update={"name": name})
                    super().register(name, task_copy, replace)
            

            register

            register(name: str, task: Job[Any, Any], replace: bool = False)
            

            Register a task with name.

            Creates a copy of the task with the name set.

            Source code in src/llmling_agent/tasks/registry.py
            26
            27
            28
            29
            30
            31
            32
            def register(self, name: str, task: Job[Any, Any], replace: bool = False):
                """Register a task with name.
            
                Creates a copy of the task with the name set.
                """
                task_copy = task.model_copy(update={"name": name})
                super().register(name, task_copy, replace)
            

            ToolSkippedError

            Bases: JobError

            Tool execution was skipped by user.

            Source code in src/llmling_agent/tasks/exceptions.py
            10
            11
            class ToolSkippedError(JobError):
                """Tool execution was skipped by user."""