feat(AI Agent Node): Implement streaming on AI agent node (no-changelog) (#16897)

This commit is contained in:
Benjamin Schroth
2025-07-04 09:21:48 +02:00
committed by GitHub
parent bd69907477
commit 5a5848aa42
13 changed files with 401 additions and 14 deletions

View File

@@ -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());