mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-19 11:01:15 +00:00
feat: Add support for AI log streaming (#8526)
Co-authored-by: Oleg Ivaniv <me@olegivaniv.com>
This commit is contained in:
@@ -23,6 +23,7 @@ import type {
|
||||
WorkflowExecuteMode,
|
||||
ExecutionStatus,
|
||||
ExecutionError,
|
||||
EventNamesAiNodesType,
|
||||
} from 'n8n-workflow';
|
||||
import {
|
||||
ApplicationError,
|
||||
@@ -68,6 +69,7 @@ import { WorkflowStaticDataService } from './workflows/workflowStaticData.servic
|
||||
import { WorkflowRepository } from './databases/repositories/workflow.repository';
|
||||
import { UrlService } from './services/url.service';
|
||||
import { WorkflowExecutionService } from './workflows/workflowExecution.service';
|
||||
import { MessageEventBus } from '@/eventbus/MessageEventBus/MessageEventBus';
|
||||
|
||||
const ERROR_TRIGGER_TYPE = config.getEnv('nodes.errorTriggerType');
|
||||
|
||||
@@ -982,6 +984,22 @@ export async function getBase(
|
||||
setExecutionStatus,
|
||||
variables,
|
||||
secretsHelpers: Container.get(SecretsHelper),
|
||||
logAiEvent: async (
|
||||
eventName: EventNamesAiNodesType,
|
||||
payload: {
|
||||
msg?: string | undefined;
|
||||
executionId: string;
|
||||
nodeName: string;
|
||||
workflowId?: string | undefined;
|
||||
workflowName: string;
|
||||
nodeType?: string | undefined;
|
||||
},
|
||||
) => {
|
||||
return await Container.get(MessageEventBus).sendAiNodeEvent({
|
||||
eventName,
|
||||
payload,
|
||||
});
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user