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:
takatost 2024-09-10 15:23:16 +08:00 • committed by GitHub
commit dabfd74622
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
156 changed files with 11158 additions and 5605 deletions

View file

@ -10,13 +10,13 @@ export const useWorkflowTemplate = () => {
const isChatMode = useIsChatMode()
const nodesInitialData = useNodesInitialData()
const startNode = generateNewNode({
const { newNode: startNode } = generateNewNode({
data: nodesInitialData.start,
position: START_INITIAL_POSITION,
})
if (isChatMode) {
const llmNode = generateNewNode({
const { newNode: llmNode } = generateNewNode({
id: 'llm',
data: {
...nodesInitialData.llm,
@ -31,7 +31,7 @@ export const useWorkflowTemplate = () => {
},
} as any)
const answerNode = generateNewNode({
const { newNode: answerNode } = generateNewNode({
id: 'answer',
data: {
...nodesInitialData.answer,