feat: Parallel Execution of Nodes in Workflows (#8192)
Co-authored-by: StyleZhang <jasonapring2015@outlook.com> Co-authored-by: Yi <yxiaoisme@gmail.com> Co-authored-by: -LAN- <laipz8200@outlook.com>
This commit is contained in:
@@ -26,9 +26,14 @@ export type NodeTracing = {
|
||||
currency: string
|
||||
iteration_id?: string
|
||||
iteration_index?: number
|
||||
parallel_id?: string
|
||||
parallel_start_node_id?: string
|
||||
parent_parallel_id?: string
|
||||
parent_parallel_start_node_id?: string
|
||||
}
|
||||
metadata: {
|
||||
iterator_length: number
|
||||
iterator_index: number
|
||||
}
|
||||
created_at: number
|
||||
created_by: {
|
||||
@@ -40,6 +45,10 @@ export type NodeTracing = {
|
||||
extras?: any
|
||||
expand?: boolean // for UI
|
||||
details?: NodeTracing[][] // iteration detail
|
||||
parallel_id?: string
|
||||
parallel_start_node_id?: string
|
||||
parent_parallel_id?: string
|
||||
parent_parallel_start_node_id?: string
|
||||
}
|
||||
|
||||
export type FetchWorkflowDraftResponse = {
|
||||
@@ -109,6 +118,7 @@ export type NodeStartedResponse = {
|
||||
data: {
|
||||
id: string
|
||||
node_id: string
|
||||
iteration_id?: string
|
||||
node_type: string
|
||||
index: number
|
||||
predecessor_node_id?: string
|
||||
@@ -125,6 +135,7 @@ export type NodeFinishedResponse = {
|
||||
data: {
|
||||
id: string
|
||||
node_id: string
|
||||
iteration_id?: string
|
||||
node_type: string
|
||||
index: number
|
||||
predecessor_node_id?: string
|
||||
@@ -138,6 +149,10 @@ export type NodeFinishedResponse = {
|
||||
total_tokens: number
|
||||
total_price: number
|
||||
currency: string
|
||||
parallel_id?: string
|
||||
parallel_start_node_id?: string
|
||||
iteration_index?: number
|
||||
iteration_id?: string
|
||||
}
|
||||
created_at: number
|
||||
}
|
||||
@@ -152,6 +167,8 @@ export type IterationStartedResponse = {
|
||||
node_id: string
|
||||
metadata: {
|
||||
iterator_length: number
|
||||
iteration_id: string
|
||||
iteration_index: number
|
||||
}
|
||||
created_at: number
|
||||
extras?: any
|
||||
@@ -169,6 +186,9 @@ export type IterationNextResponse = {
|
||||
output: any
|
||||
extras?: any
|
||||
created_at: number
|
||||
execution_metadata: {
|
||||
parallel_id?: string
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -184,6 +204,39 @@ export type IterationFinishedResponse = {
|
||||
status: string
|
||||
created_at: number
|
||||
error: string
|
||||
execution_metadata: {
|
||||
parallel_id?: string
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export type ParallelBranchStartedResponse = {
|
||||
task_id: string
|
||||
workflow_run_id: string
|
||||
event: string
|
||||
data: {
|
||||
parallel_id: string
|
||||
parallel_start_node_id: string
|
||||
parent_parallel_id: string
|
||||
parent_parallel_start_node_id: string
|
||||
iteration_id?: string
|
||||
created_at: number
|
||||
}
|
||||
}
|
||||
|
||||
export type ParallelBranchFinishedResponse = {
|
||||
task_id: string
|
||||
workflow_run_id: string
|
||||
event: string
|
||||
data: {
|
||||
parallel_id: string
|
||||
parallel_start_node_id: string
|
||||
parent_parallel_id: string
|
||||
parent_parallel_start_node_id: string
|
||||
iteration_id?: string
|
||||
status: string
|
||||
created_at: number
|
||||
error: string
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user