From 91dfc4d51322ccfe64e9fe4d67c0b143450f9e95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E0=A4=95=E0=A4=BE=E0=A4=B0=E0=A4=A4=E0=A5=8B=E0=A4=AB?= =?UTF-8?q?=E0=A5=8D=E0=A4=AB=E0=A5=87=E0=A4=B2=E0=A4=B8=E0=A5=8D=E0=A4=95?= =?UTF-8?q?=E0=A5=8D=E0=A4=B0=E0=A4=BF=E0=A4=AA=E0=A5=8D=E0=A4=9F=E2=84=A2?= Date: Fri, 20 Oct 2023 10:52:56 +0200 Subject: [PATCH] feat(core): Update LLM applications building support (no-changelog) (#7418) extracted out of #7336 --------- Co-authored-by: Jan Oberhauser Co-authored-by: OlegIvaniv Co-authored-by: Jan Oberhauser Co-authored-by: Val <68596159+valya@users.noreply.github.com> Co-authored-by: Alex Grozav Co-authored-by: Deborah Co-authored-by: Jesper Bylund Co-authored-by: Jon --- packages/core/src/NodeExecuteFunctions.ts | 6 +++- .../src/components/ChatEmbedModal.vue | 4 +-- .../src/components/NodeDetailsView.vue | 19 +++++++++-- .../src/components/NodeExecuteButton.vue | 3 ++ .../editor-ui/src/components/NodeSettings.vue | 16 +++++---- .../editor-ui/src/components/OutputPanel.vue | 6 ++-- packages/editor-ui/src/components/RunData.vue | 9 ++--- .../editor-ui/src/components/RunDataJson.vue | 30 ++++++++--------- .../src/components/VariableSelector.vue | 1 - .../src/components/WorkflowLMChat.vue | 33 ++++++++----------- packages/editor-ui/src/constants.ts | 2 +- .../editor-ui/src/mixins/workflowHelpers.ts | 22 +++++++------ packages/editor-ui/src/views/NodeView.vue | 11 +++++-- packages/workflow/src/Interfaces.ts | 5 +-- 14 files changed, 93 insertions(+), 74 deletions(-) diff --git a/packages/core/src/NodeExecuteFunctions.ts b/packages/core/src/NodeExecuteFunctions.ts index bee0190a07a81..03a4b4d8a1837 100644 --- a/packages/core/src/NodeExecuteFunctions.ts +++ b/packages/core/src/NodeExecuteFunctions.ts @@ -2469,6 +2469,10 @@ const addExecutionDataFunctions = async ( }); } + if (get(runExecutionData, 'executionData.metadata', undefined) === undefined) { + runExecutionData.executionData!.metadata = {}; + } + let sourceTaskData = get(runExecutionData, `executionData.metadata[${sourceNodeName}]`); if (!sourceTaskData) { @@ -3033,7 +3037,7 @@ export function getExecuteFunctions( }; try { - return await nodeType.supplyData.call(context); + return await nodeType.supplyData.call(context, itemIndex); } catch (error) { if (!(error instanceof ExecutionBaseError)) { error = new NodeOperationError(connectedNode, error, { diff --git a/packages/editor-ui/src/components/ChatEmbedModal.vue b/packages/editor-ui/src/components/ChatEmbedModal.vue index 683ac4e72e84a..6bc28ad6e03a2 100644 --- a/packages/editor-ui/src/components/ChatEmbedModal.vue +++ b/packages/editor-ui/src/components/ChatEmbedModal.vue @@ -69,9 +69,9 @@ import { createChat } from '@n8n/chat';`, })); const cdnCode = computed( - () => ` + () => `