fabricatio_tool.capabilities.handle
This module contains the HandleTask class, which is responsible for handling tasks based on task objects.
It utilizes tool usage code drafting and execution mechanisms to perform tasks asynchronously. The class interacts with tools and manages their execution workflow.
Classes
A class that handles a task based on a task object. |
Module Contents
- class fabricatio_tool.capabilities.handle.Handle(/, **data: Any)
Bases:
fabricatio_tool.capabilities.use_tool.UseTool,abc.ABCA class that handles a task based on a task object.
- async draft_tool_usage_code(request: str, tools: List[fabricatio_tool.models.tool.Tool], data: Dict[str, Any], output_spec: Dict[str, str] | None = None, last_error: fabricatio_tool.models.collector.ApplicationError | None = None, **kwargs: Unpack[fabricatio_core.models.kwargs_types.ValidateKwargs[str]]) str | None
Asynchronously drafts the tool usage code for a task based on a given task object and tools.
- async handle_fine_grind(request: str, data: Dict[str, Any], output_spec: Dict[str, str] | None = None, box_choose_kwargs: fabricatio_core.models.kwargs_types.ChooseKwargs[fabricatio_tool.models.tool.ToolBox] | None = None, tool_choose_kwargs: fabricatio_core.models.kwargs_types.ChooseKwargs[fabricatio_tool.models.tool.Tool] | None = None, **kwargs: Unpack[fabricatio_core.models.kwargs_types.ValidateKwargs[str]]) fabricatio_tool.models.collector.ResultCollector | None
Asynchronously handles a task based on a given task object and parameters.
- async handle(request: str, data: Dict[str, Any] | None = None, output_spec: Dict[str, str] | None = None, **kwargs: Unpack[fabricatio_core.models.kwargs_types.ValidateKwargs[str]]) fabricatio_tool.models.collector.ResultCollector | None
Asynchronously handles a task based on a given task object and parameters.