Manager
Here will define a list of clusters
Each cluster will have a list of chain components
For example, end-to-end conversation chain will have the following components:
- completed_speech2text
- created_data_text
- completed_emotion_detection
- completed_quantization_llm
- completed_text2speech
ClusterManager
Source code in API/orchestrator/chain/manager.py
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 |
|
chain_next(track_id, current_component, next_component_params, name=None, user=None)
classmethod
Chain to the next component
Parameters:
Name | Type | Description | Default |
---|---|---|---|
current_component
|
str
|
The current component |
required |
track_id
|
str
|
The track ID |
required |
next_component_params
|
dict
|
The next component parameters |
required |
name
|
str
|
The task name, it will be used to aggregate the task |
None
|
user
|
None
|
The user |
None
|
Source code in API/orchestrator/chain/manager.py
84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 |
|
get_cluster(cluster_name)
staticmethod
Get the cluster
Parameters:
Name | Type | Description | Default |
---|---|---|---|
cluster_name
|
str
|
The cluster name |
required |
Source code in API/orchestrator/chain/manager.py
28 29 30 31 32 33 34 35 36 37 38 |
|
get_next(cluster_name, current_component)
classmethod
Get the next component
Parameters:
Name | Type | Description | Default |
---|---|---|---|
cluster_name
|
str
|
The cluster name |
required |
current_component
|
str
|
The current component |
required |
Source code in API/orchestrator/chain/manager.py
70 71 72 73 74 75 76 77 78 79 80 81 82 |
|
get_next_chain_component(cluster, current_component)
staticmethod
Get the next chain
Parameters:
Name | Type | Description | Default |
---|---|---|---|
cluster
|
dict
|
The cluster |
required |
current_component
|
str
|
The current component |
required |
Return
Tuple[Optional[str], Optional[dict]]: The next component and its parameters if exists, otherwise None
Source code in API/orchestrator/chain/manager.py
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 |
|