nat.plugins.langchain.control_flow.parallel_executor#
Attributes#
Exceptions#
Raised when one or more configured tools cannot be resolved. |
Classes#
Configuration for parallel execution of independent tools. |
Functions#
|
|
|
|
|
Create a parallel executor that fans out input to all tools and fans in branch outputs. |
Module Contents#
- logger#
- exception UnknownParallelToolsError(tool_names: list[str])#
Bases:
ValueErrorRaised when one or more configured tools cannot be resolved.
Initialize self. See help(type(self)) for accurate signature.
- class ParallelExecutorConfig#
Bases:
nat.data_models.function.FunctionBaseConfigConfiguration for parallel execution of independent tools.
- tool_list: list[nat.data_models.component_ref.FunctionRef] = None#
- async _invoke_branch(
- tool_name: str,
- tool: langchain_core.tools.base.BaseTool,
- input_message: object,
- detailed_logs: bool,
- log_prefix: str,
- return_error_on_exception: bool,
- async parallel_execution(
- config: ParallelExecutorConfig,
- builder: nat.builder.builder.Builder,
Create a parallel executor that fans out input to all tools and fans in branch outputs.