feat(core): Improve Langsmith traces for AI executions (#9081)

Signed-off-by: Oleg Ivaniv <me@olegivaniv.com>
This commit is contained in:
oleg
2024-04-08 22:51:49 +02:00
committed by GitHub
parent 3bcfef95f6
commit 936682eeaa
18 changed files with 99 additions and 26 deletions

View File

@@ -98,6 +98,7 @@ import type {
Workflow,
WorkflowActivateMode,
WorkflowExecuteMode,
CallbackManager,
} from 'n8n-workflow';
import {
ExpressionError,
@@ -3487,6 +3488,7 @@ export function getExecuteFunctions(
async executeWorkflow(
workflowInfo: IExecuteWorkflowInfo,
inputData?: INodeExecutionData[],
parentCallbackManager?: CallbackManager,
): Promise<any> {
return await additionalData
.executeWorkflow(workflowInfo, additionalData, {
@@ -3494,6 +3496,7 @@ export function getExecuteFunctions(
inputData,
parentWorkflowSettings: workflow.settings,
node,
parentCallbackManager,
})
.then(
async (result) =>
@@ -3719,6 +3722,7 @@ export function getExecuteFunctions(
msg,
});
},
getParentCallbackManager: () => additionalData.parentCallbackManager,
};
})(workflow, runExecutionData, connectionInputData, inputData, node) as IExecuteFunctions;
}