Skip to content

Commit

Permalink
fix: entry (#2652)
Browse files Browse the repository at this point in the history
  • Loading branch information
c121914yu authored Sep 9, 2024
1 parent 78ad279 commit bbdab1d
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,10 @@ export const runToolWithFunctionCall = async (
isEntry: true,
inputs: updateToolInputValue({ params: startParams, inputs: item.inputs })
}
: item
: {
...item,
isEntry: false
}
)
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,10 @@ export const runToolWithPromptCall = async (
isEntry: true,
inputs: updateToolInputValue({ params: startParams, inputs: item.inputs })
}
: item
: {
...item,
isEntry: false
}
)
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,10 @@ export const runToolWithToolChoice = async (
isEntry: true,
inputs: updateToolInputValue({ params: startParams, inputs: item.inputs })
}
: item
: {
...item,
isEntry: false
}
)
});

Expand Down Expand Up @@ -359,6 +362,7 @@ export const runToolWithToolChoice = async (
};
}
} catch (error) {
console.log(error);
addLog.warn(`LLM response error`, {
requestBody
});
Expand Down
9 changes: 6 additions & 3 deletions packages/service/core/workflow/dispatch/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -532,9 +532,12 @@ export async function dispatchWorkFlow(data: Props): Promise<DispatchFlowRespons
const entryNodes = runtimeNodes.filter((item) => item.isEntry);

// reset entry
// runtimeNodes.forEach((item) => {
// item.isEntry = false;
// });
runtimeNodes.forEach((item) => {
// Interactive node is not the entry node, return interactive result
if (item.flowNodeType !== FlowNodeTypeEnum.userSelect) {
item.isEntry = false;
}
});
await Promise.all(entryNodes.map((node) => checkNodeCanRun(node)));

// focus try to run pluginOutput
Expand Down

0 comments on commit bbdab1d

Please sign in to comment.