Class swarmauri_core.chains.IChainDependencyResolver.IChainDependencyResolver
swarmauri_core.chains.IChainDependencyResolver.IChainDependencyResolver
Bases: ABC
build_dependencies
abstractmethod
build_dependencies()
Builds the dependencies for a particular sequence in the matrix.
PARAMETER | DESCRIPTION |
---|---|
matrix
|
The prompt matrix.
TYPE:
|
sequence_index
|
The index of the sequence to build dependencies for.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
List[ChainStep]
|
Tuple containing indegrees and graph dicts. |
Source code in swarmauri_core/chains/IChainDependencyResolver.py
7 8 9 10 11 12 13 14 15 16 17 18 19 |
|
resolve_dependencies
abstractmethod
resolve_dependencies(matrix, sequence_index)
Resolves the execution order based on the provided dependencies.
PARAMETER | DESCRIPTION |
---|---|
indegrees
|
The indegrees of each node.
TYPE:
|
graph
|
The graph representing dependencies.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
List[int]
|
List[int]: The resolved execution order. |
Source code in swarmauri_core/chains/IChainDependencyResolver.py
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
|