- class council.chains.Chain(name: str, description: str, runners: Sequence[RunnerBase], support_instructions: bool = False)#
Represents a chain of skills that can be executed in a specific order.
- __init__(name: str, description: str, runners: Sequence[RunnerBase], support_instructions: bool = False)#
Initializes the Chain object.
name (str) – The name of the chain.
description (str) – The description of the chain.
runners (List[RunnerBase]) – The list of runners representing the skills in the chain.
- property description: str#
the description of the chain.
- execute(context: ChainContext, executor: ThreadPoolExecutor | None = None) None #
Executes the chain of skills based on the provided context, budget, and optional executor.
context (ChainContext) – The context for executing the chain.
executor (Optional[RunnerExecutor]) – The skill executor to use for executing the chain.
The result of executing the chain.
- Return type:
- property name: str#
the name of the chain
- render_as_dict(include_children: bool = True) Dict[str, Any] #
returns the graph of operation as a dictionary
- render_as_json() str #
returns the graph of operation as a JSON string