From 972f700ec9cc3e775acbf130f0852e6f099d3123 Mon Sep 17 00:00:00 2001 From: Mutasem Aldmour Date: Mon, 6 Jan 2025 16:00:00 +0100 Subject: [PATCH 1/4] feat: Update copy for Vector Store Tool modes (no-changelog) --- .../nodes/vector_store/shared/createVectorStoreNode.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/@n8n/nodes-langchain/nodes/vector_store/shared/createVectorStoreNode.ts b/packages/@n8n/nodes-langchain/nodes/vector_store/shared/createVectorStoreNode.ts index f8e11cadf1d23..441126c98589a 100644 --- a/packages/@n8n/nodes-langchain/nodes/vector_store/shared/createVectorStoreNode.ts +++ b/packages/@n8n/nodes-langchain/nodes/vector_store/shared/createVectorStoreNode.ts @@ -111,17 +111,17 @@ function getOperationModeOptions(args: VectorStoreNodeConstructorArgs): INodePro action: 'Add documents to vector store', }, { - name: 'Retrieve Documents (As Vector Store for AI Agent)', + name: 'Retrieve Documents (As Vector Store for Chain/Tool)', value: 'retrieve', description: 'Retrieve documents from vector store to be used as vector store with AI nodes', - action: 'Retrieve documents for AI processing as Vector Store', + action: 'Retrieve documents for Chain/Tool as Vector Store', outputConnectionType: NodeConnectionType.AiVectorStore, }, { name: 'Retrieve Documents (As Tool for AI Agent)', value: 'retrieve-as-tool', description: 'Retrieve documents from vector store to be used as tool with AI nodes', - action: 'Retrieve documents for AI processing as Tool', + action: 'Retrieve documents for AI Agent as Tool', outputConnectionType: NodeConnectionType.AiTool, }, { From 5c2e39f9a1037f8d10e5e547916fe3c8792cb761 Mon Sep 17 00:00:00 2001 From: Mutasem Aldmour Date: Mon, 6 Jan 2025 16:01:01 +0100 Subject: [PATCH 2/4] test: update --- .../shared/__snapshots__/createVectorStoreNode.test.ts.snap | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/@n8n/nodes-langchain/nodes/vector_store/shared/__snapshots__/createVectorStoreNode.test.ts.snap b/packages/@n8n/nodes-langchain/nodes/vector_store/shared/__snapshots__/createVectorStoreNode.test.ts.snap index 91da891842e48..2eff69800b5e8 100644 --- a/packages/@n8n/nodes-langchain/nodes/vector_store/shared/__snapshots__/createVectorStoreNode.test.ts.snap +++ b/packages/@n8n/nodes-langchain/nodes/vector_store/shared/__snapshots__/createVectorStoreNode.test.ts.snap @@ -89,14 +89,14 @@ exports[`createVectorStoreNode retrieve mode supplies vector store as data 1`] = "value": "insert", }, { - "action": "Retrieve documents for AI processing as Vector Store", + "action": "Retrieve documents for Chain/Tool as Vector Store", "description": "Retrieve documents from vector store to be used as vector store with AI nodes", - "name": "Retrieve Documents (As Vector Store for AI Agent)", + "name": "Retrieve Documents (As Vector Store for Chain/Tool)", "outputConnectionType": "ai_vectorStore", "value": "retrieve", }, { - "action": "Retrieve documents for AI processing as Tool", + "action": "Retrieve documents for AI Agent as Tool", "description": "Retrieve documents from vector store to be used as tool with AI nodes", "name": "Retrieve Documents (As Tool for AI Agent)", "outputConnectionType": "ai_tool", From 88b18cafc0d1d9bdd5669db610596aca7774fd0b Mon Sep 17 00:00:00 2001 From: Mutasem Aldmour Date: Mon, 6 Jan 2025 16:50:05 +0100 Subject: [PATCH 3/4] test: update --- cypress/composables/workflow.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cypress/composables/workflow.ts b/cypress/composables/workflow.ts index 29b871f560a40..5d5be1902c444 100644 --- a/cypress/composables/workflow.ts +++ b/cypress/composables/workflow.ts @@ -174,7 +174,7 @@ export function addVectorStoreToolToParent(nodeName: string, parentNodeName: str connectNodeToParent(nodeName, 'ai_tool', parentNodeName, false); getParameterInputByName('mode') .find('input') - .should('have.value', 'Retrieve Documents (As Tool for AI Agent)'); + .should('have.value', 'Retrieve documents for AI Agent as Tool'); clickGetBackToCanvas(); getConnectionBySourceAndTarget(nodeName, parentNodeName).should('exist'); } From 54915522d8ab0f1300503fa060e68a2443860130 Mon Sep 17 00:00:00 2001 From: Mutasem Aldmour Date: Tue, 7 Jan 2025 12:11:09 +0100 Subject: [PATCH 4/4] test: fix --- cypress/composables/workflow.ts | 2 +- cypress/e2e/4-node-creator.cy.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cypress/composables/workflow.ts b/cypress/composables/workflow.ts index 5d5be1902c444..29b871f560a40 100644 --- a/cypress/composables/workflow.ts +++ b/cypress/composables/workflow.ts @@ -174,7 +174,7 @@ export function addVectorStoreToolToParent(nodeName: string, parentNodeName: str connectNodeToParent(nodeName, 'ai_tool', parentNodeName, false); getParameterInputByName('mode') .find('input') - .should('have.value', 'Retrieve documents for AI Agent as Tool'); + .should('have.value', 'Retrieve Documents (As Tool for AI Agent)'); clickGetBackToCanvas(); getConnectionBySourceAndTarget(nodeName, parentNodeName).should('exist'); } diff --git a/cypress/e2e/4-node-creator.cy.ts b/cypress/e2e/4-node-creator.cy.ts index e841605863044..5e32d5568c106 100644 --- a/cypress/e2e/4-node-creator.cy.ts +++ b/cypress/e2e/4-node-creator.cy.ts @@ -517,7 +517,7 @@ describe('Node Creator', () => { const actions = [ 'Get ranked documents from vector store', 'Add documents to vector store', - 'Retrieve documents for AI processing', + 'Retrieve documents for Chain/Tool as Vector Store', ]; nodeCreatorFeature.actions.openNodeCreator();