mirror of
https://github.com/n8n-io/n8n.git
synced 2025-03-05 20:50:17 -08:00
feat: support workflow retrieval debugging
This commit is contained in:
parent
e9bbc714f1
commit
2dcf04db76
|
@ -418,6 +418,7 @@ export class RetrieverWorkflow implements INodeType {
|
||||||
metadata: {
|
metadata: {
|
||||||
...baseMetadata,
|
...baseMetadata,
|
||||||
itemIndex: index,
|
itemIndex: index,
|
||||||
|
executionId: receivedData.executionId,
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|
|
@ -220,8 +220,14 @@ export function logWrapper(
|
||||||
arguments: [query, config],
|
arguments: [query, config],
|
||||||
})) as Array<Document<Record<string, any>>>;
|
})) as Array<Document<Record<string, any>>>;
|
||||||
|
|
||||||
|
const executionId: string | undefined = response[0]?.metadata?.executionId as string;
|
||||||
|
const workflowId: string | undefined = response[0]?.metadata?.workflowId as string;
|
||||||
|
|
||||||
logAiEvent(executeFunctions, 'ai-documents-retrieved', { query });
|
logAiEvent(executeFunctions, 'ai-documents-retrieved', { query });
|
||||||
executeFunctions.addOutputData(connectionType, index, [[{ json: { response } }]]);
|
executeFunctions.addOutputData(connectionType, index, [[{ json: { response } }]], {
|
||||||
|
executionId,
|
||||||
|
workflowId,
|
||||||
|
});
|
||||||
return response;
|
return response;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue