mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
feat(AI Agent Node): Implement streaming on AI agent node (no-changelog) (#16897)
This commit is contained in:
@@ -656,15 +656,6 @@ export async function executeWebhook(
|
||||
);
|
||||
}
|
||||
|
||||
// Start now to run the workflow
|
||||
executionId = await Container.get(WorkflowRunner).run(
|
||||
runData,
|
||||
true,
|
||||
!didSendResponse,
|
||||
executionId,
|
||||
responsePromise,
|
||||
);
|
||||
|
||||
if (responseMode === 'streaming') {
|
||||
Container.get(Logger).debug(
|
||||
`Execution of workflow "${workflow.name}" from with ID ${executionId} is set to streaming`,
|
||||
@@ -676,6 +667,15 @@ export async function executeWebhook(
|
||||
didSendResponse = true;
|
||||
}
|
||||
|
||||
// Start now to run the workflow
|
||||
executionId = await Container.get(WorkflowRunner).run(
|
||||
runData,
|
||||
true,
|
||||
!didSendResponse,
|
||||
executionId,
|
||||
responsePromise,
|
||||
);
|
||||
|
||||
if (responseMode === 'formPage' && !didSendResponse) {
|
||||
res.send({ formWaitingUrl: `${additionalData.formWaitingBaseUrl}/${executionId}` });
|
||||
process.nextTick(() => res.end());
|
||||
|
||||
Reference in New Issue
Block a user