@n8n/n8n-nodes-langchain 3.0.0 → 3.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/credentials/WeaviateApi.credentials.js +14 -0
- package/dist/credentials/WeaviateApi.credentials.js.map +1 -1
- package/dist/node-definitions/.nodes-hash +1 -1
- package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStoreWeaviate/v1/mode_insert.ts +2 -1
- package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStoreWeaviate/v1/mode_load.ts +2 -1
- package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStoreWeaviate/v1/mode_retrieve.ts +2 -1
- package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStoreWeaviate/v1/mode_retrieve_as_tool.ts +2 -1
- package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStoreWeaviate/v11/mode_insert.ts +2 -1
- package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStoreWeaviate/v11/mode_load.ts +2 -1
- package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStoreWeaviate/v11/mode_retrieve.ts +2 -1
- package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStoreWeaviate/v11/mode_retrieve_as_tool.ts +2 -1
- package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStoreWeaviate/v12/mode_insert.ts +2 -1
- package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStoreWeaviate/v12/mode_load.ts +2 -1
- package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStoreWeaviate/v12/mode_retrieve.ts +2 -1
- package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStoreWeaviate/v12/mode_retrieve_as_tool.ts +2 -1
- package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStoreWeaviate/v13/mode_insert.ts +2 -1
- package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStoreWeaviate/v13/mode_load.ts +2 -1
- package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStoreWeaviate/v13/mode_retrieve.ts +2 -1
- package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStoreWeaviate/v13/mode_retrieve_as_tool.ts +2 -1
- package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStoreWeaviate/v14/mode_insert.ts +2 -1
- package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStoreWeaviate/v14/mode_load.ts +2 -1
- package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStoreWeaviate/v14/mode_retrieve.ts +2 -1
- package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStoreWeaviate/v14/mode_retrieve_as_tool.ts +2 -1
- package/dist/nodes/embeddings/EmbeddingsGoogleGemini/EmbeddingsGoogleGemini.node.js +2 -0
- package/dist/nodes/embeddings/EmbeddingsGoogleGemini/EmbeddingsGoogleGemini.node.js.map +1 -1
- package/dist/nodes/embeddings/EmbeddingsLemonade/EmbeddingsLemonade.node.js +3 -0
- package/dist/nodes/embeddings/EmbeddingsLemonade/EmbeddingsLemonade.node.js.map +1 -1
- package/dist/nodes/llms/LMLemonade/LmLemonade.node.js +3 -0
- package/dist/nodes/llms/LMLemonade/LmLemonade.node.js.map +1 -1
- package/dist/nodes/llms/LmChatGoogleGemini/LmChatGoogleGemini.node.js +2 -0
- package/dist/nodes/llms/LmChatGoogleGemini/LmChatGoogleGemini.node.js.map +1 -1
- package/dist/nodes/mcp/McpClientTool/utils.js +1 -1
- package/dist/nodes/mcp/McpClientTool/utils.js.map +1 -1
- package/dist/nodes/mcp/shared/runtime.js +14 -1
- package/dist/nodes/mcp/shared/runtime.js.map +1 -1
- package/dist/nodes/trigger/ChatTrigger/ChatTrigger.node.js +4 -0
- package/dist/nodes/trigger/ChatTrigger/ChatTrigger.node.js.map +1 -1
- package/dist/nodes/trigger/ChatTrigger/GenericFunctions.js +2 -2
- package/dist/nodes/trigger/ChatTrigger/GenericFunctions.js.map +1 -1
- package/dist/nodes/vector_store/VectorStoreWeaviate/VectorStoreWeaviate.node.js +3 -5
- package/dist/nodes/vector_store/VectorStoreWeaviate/VectorStoreWeaviate.node.js.map +1 -1
- package/dist/nodes/vector_store/VectorStoreWeaviate/Weaviate.utils.d.ts +3 -2
- package/dist/nodes/vector_store/VectorStoreWeaviate/Weaviate.utils.js +20 -2
- package/dist/nodes/vector_store/VectorStoreWeaviate/Weaviate.utils.js.map +1 -1
- package/dist/typecheck.tsbuildinfo +1 -1
- package/dist/types/credentials.json +1 -1
- package/dist/types/nodes.json +1 -1
- package/dist/utils/agent-execution/createEngineRequests.js +13 -1
- package/dist/utils/agent-execution/createEngineRequests.js.map +1 -1
- package/dist/utils/agent-execution/executeEngineAction.d.ts +1 -1
- package/dist/utils/agent-execution/executeEngineAction.js +10 -1
- package/dist/utils/agent-execution/executeEngineAction.js.map +1 -1
- package/dist/utils/agent-execution/index.d.ts +1 -0
- package/dist/utils/agent-execution/index.js +3 -1
- package/dist/utils/agent-execution/index.js.map +1 -1
- package/dist/utils/agent-execution/processHitlResponses.js +3 -2
- package/dist/utils/agent-execution/processHitlResponses.js.map +1 -1
- package/dist/utils/agent-execution/types.d.ts +2 -0
- package/dist/utils/agent-execution/types.js +2 -0
- package/dist/utils/agent-execution/types.js.map +1 -1
- package/dist/utils/schemaParsing.js +1 -3
- package/dist/utils/schemaParsing.js.map +1 -1
- package/package.json +13 -14
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
{"name":"qdrantApi","displayName":"Qdrant API","documentationUrl":"https://docs.n8n.io/integrations/builtin/credentials/qdrant/","properties":[{"displayName":"API Key","name":"apiKey","type":"string","typeOptions":{"password":true},"required":false,"default":""},{"displayName":"Qdrant URL","name":"qdrantUrl","type":"string","required":true,"default":""}],"authenticate":{"type":"generic","properties":{"headers":{"api-key":"={{$credentials.apiKey}}"}}},"test":{"request":{"baseURL":"={{$credentials.qdrantUrl}}","url":"/collections"}},"supportedNodes":["vectorStoreQdrant"],"iconUrl":"icons/@n8n/n8n-nodes-langchain/dist/nodes/vector_store/VectorStoreQdrant/qdrant.svg"},
|
|
29
29
|
{"name":"searXngApi","displayName":"SearXNG","documentationUrl":"searxng","properties":[{"displayName":"API URL","name":"apiUrl","type":"string","default":"","required":true}],"supportedNodes":["toolSearXng"],"iconUrl":"icons/@n8n/n8n-nodes-langchain/dist/nodes/tools/ToolSearXng/searXng.svg"},
|
|
30
30
|
{"name":"vercelAiGatewayApi","displayName":"Vercel AI Gateway","documentationUrl":"vercel","properties":[{"displayName":"API Key or OIDC Token","name":"apiKey","type":"string","typeOptions":{"password":true},"required":true,"default":"","description":"Your credentials for the Vercel AI Gateway"},{"displayName":"Base URL","name":"url","type":"string","required":true,"default":"https://ai-gateway.vercel.sh/v1","description":"The base URL for your Vercel AI Gateway instance","placeholder":"https://ai-gateway.vercel.sh/v1"}],"authenticate":{"type":"generic","properties":{"headers":{"Authorization":"=Bearer {{$credentials.apiKey}}","http-referer":"https://n8n.io/","x-title":"n8n"}}},"test":{"request":{"baseURL":"={{ $credentials.url }}","url":"/chat/completions","method":"POST","headers":{"http-referer":"https://n8n.io/","x-title":"n8n"},"body":{"model":"openai/gpt-4.1-nano","messages":[{"role":"user","content":"test"}],"max_tokens":1}}},"supportedNodes":["lmChatVercelAiGateway"],"iconUrl":{"light":"icons/@n8n/n8n-nodes-langchain/dist/nodes/llms/LmChatVercelAiGateway/vercel.dark.svg","dark":"icons/@n8n/n8n-nodes-langchain/dist/nodes/llms/LmChatVercelAiGateway/vercel.svg"}},
|
|
31
|
-
{"name":"weaviateApi","displayName":"Weaviate Credentials","documentationUrl":"https://docs.n8n.io/integrations/builtin/credentials/weaviate/","properties":[{"displayName":"Connection Type","name":"connection_type","type":"options","options":[{"name":"Weaviate Cloud","value":"weaviate_cloud"},{"name":"Custom Connection","value":"custom_connection"}],"default":"weaviate_cloud","description":"Choose whether to connect to a Weaviate Cloud instance or a custom Weaviate instance."},{"displayName":"Weaviate Cloud Endpoint","name":"weaviate_cloud_endpoint","description":"The Endpoint of a Weaviate Cloud instance.","placeholder":"https://your-cluster.weaviate.cloud","type":"string","required":true,"default":"","displayOptions":{"show":{"connection_type":["weaviate_cloud"]}}},{"displayName":"Weaviate Api Key","name":"weaviate_api_key","description":"The API key for the Weaviate instance.","type":"string","typeOptions":{"password":true},"default":""},{"displayName":"Custom Connection HTTP Host","name":"custom_connection_http_host","description":"The host of your Weaviate instance.","type":"string","required":true,"default":"weaviate","displayOptions":{"show":{"connection_type":["custom_connection"]}}},{"displayName":"Custom Connection HTTP Port","name":"custom_connection_http_port","description":"The port of your Weaviate instance.","type":"number","required":true,"default":8080,"displayOptions":{"show":{"connection_type":["custom_connection"]}}},{"displayName":"Custom Connection HTTP Secure","name":"custom_connection_http_secure","description":"Whether to use a secure connection for HTTP.","type":"boolean","required":true,"default":false,"displayOptions":{"show":{"connection_type":["custom_connection"]}}},{"displayName":"Custom Connection gRPC Host","name":"custom_connection_grpc_host","description":"The gRPC host of your Weaviate instance.","type":"string","required":true,"default":"weaviate","displayOptions":{"show":{"connection_type":["custom_connection"]}}},{"displayName":"Custom Connection gRPC Port","name":"custom_connection_grpc_port","description":"The gRPC port of your Weaviate instance.","type":"number","required":true,"default":50051,"displayOptions":{"show":{"connection_type":["custom_connection"]}}},{"displayName":"Custom Connection gRPC Secure","name":"custom_connection_grpc_secure","description":"Whether to use a secure connection for gRPC.","type":"boolean","required":true,"default":false,"displayOptions":{"show":{"connection_type":["custom_connection"]}}}],"test":{"request":{"baseURL":"={{$credentials.weaviate_cloud_endpoint?$credentials.weaviate_cloud_endpoint.startsWith(\"http://\") || $credentials.weaviate_cloud_endpoint.startsWith(\"https://\")?$credentials.weaviate_cloud_endpoint:\"https://\" + $credentials.weaviate_cloud_endpoint:($credentials.custom_connection_http_secure ? \"https\" : \"http\") + \"://\" + $credentials.custom_connection_http_host + \":\" + $credentials.custom_connection_http_port }}","url":"/v1/nodes","disableFollowRedirect":false,"headers":{"Authorization":"={{$if($credentials.weaviate_api_key, \"Bearer \" + $credentials.weaviate_api_key, undefined)}}"}}},"supportedNodes":["vectorStoreWeaviate"],"iconUrl":"icons/@n8n/n8n-nodes-langchain/dist/nodes/vector_store/VectorStoreWeaviate/weaviate.svg"},
|
|
31
|
+
{"name":"weaviateApi","displayName":"Weaviate Credentials","documentationUrl":"https://docs.n8n.io/integrations/builtin/credentials/weaviate/","properties":[{"displayName":"Connection Type","name":"connection_type","type":"options","options":[{"name":"Weaviate Cloud","value":"weaviate_cloud"},{"name":"Custom Connection","value":"custom_connection"}],"default":"weaviate_cloud","description":"Choose whether to connect to a Weaviate Cloud instance or a custom Weaviate instance."},{"displayName":"Weaviate Cloud Endpoint","name":"weaviate_cloud_endpoint","description":"The Endpoint of a Weaviate Cloud instance.","placeholder":"https://your-cluster.weaviate.cloud","type":"string","required":true,"default":"","displayOptions":{"show":{"connection_type":["weaviate_cloud"]}}},{"displayName":"Weaviate Api Key","name":"weaviate_api_key","description":"The API key for the Weaviate instance.","type":"string","typeOptions":{"password":true},"default":""},{"displayName":"Custom Connection HTTP Host","name":"custom_connection_http_host","description":"The host of your Weaviate instance.","type":"string","required":true,"default":"weaviate","displayOptions":{"show":{"connection_type":["custom_connection"]}}},{"displayName":"Custom Connection HTTP Port","name":"custom_connection_http_port","description":"The port of your Weaviate instance.","type":"number","required":true,"default":8080,"displayOptions":{"show":{"connection_type":["custom_connection"]}}},{"displayName":"Custom Connection HTTP Secure","name":"custom_connection_http_secure","description":"Whether to use a secure connection for HTTP.","type":"boolean","required":true,"default":false,"displayOptions":{"show":{"connection_type":["custom_connection"]}}},{"displayName":"Custom Connection gRPC Host","name":"custom_connection_grpc_host","description":"The gRPC host of your Weaviate instance.","type":"string","required":true,"default":"weaviate","displayOptions":{"show":{"connection_type":["custom_connection"]}}},{"displayName":"Custom Connection gRPC Port","name":"custom_connection_grpc_port","description":"The gRPC port of your Weaviate instance.","type":"number","required":true,"default":50051,"displayOptions":{"show":{"connection_type":["custom_connection"]}}},{"displayName":"Custom Connection gRPC Secure","name":"custom_connection_grpc_secure","description":"Whether to use a secure connection for gRPC.","type":"boolean","required":true,"default":false,"displayOptions":{"show":{"connection_type":["custom_connection"]}}},{"displayName":"Custom Connection gRPC Proxy","name":"custom_connection_grpc_proxy","description":"The URL of an HTTP proxy for gRPC requests. Leave empty to connect directly.","placeholder":"http://proxy.example.com:3128","type":"string","typeOptions":{"password":true},"default":"","displayOptions":{"show":{"connection_type":["custom_connection"]}}}],"test":{"request":{"baseURL":"={{$credentials.weaviate_cloud_endpoint?$credentials.weaviate_cloud_endpoint.startsWith(\"http://\") || $credentials.weaviate_cloud_endpoint.startsWith(\"https://\")?$credentials.weaviate_cloud_endpoint:\"https://\" + $credentials.weaviate_cloud_endpoint:($credentials.custom_connection_http_secure ? \"https\" : \"http\") + \"://\" + $credentials.custom_connection_http_host + \":\" + $credentials.custom_connection_http_port }}","url":"/v1/nodes","disableFollowRedirect":false,"headers":{"Authorization":"={{$if($credentials.weaviate_api_key, \"Bearer \" + $credentials.weaviate_api_key, undefined)}}"}}},"supportedNodes":["vectorStoreWeaviate"],"iconUrl":"icons/@n8n/n8n-nodes-langchain/dist/nodes/vector_store/VectorStoreWeaviate/weaviate.svg"},
|
|
32
32
|
{"name":"wolframAlphaApi","displayName":"Wolfram Alpha API","documentationUrl":"wolframalpha","properties":[{"displayName":"App ID","name":"appId","type":"string","typeOptions":{"password":true},"required":true,"default":""}],"authenticate":{"type":"generic","properties":{"qs":{"api_key":"={{$credentials.appId}}"}}},"test":{"request":{"baseURL":"https://api.wolframalpha.com/v1","url":"=/simple","qs":{"i":"How much is 1 1","appid":"={{$credentials.appId}}"}}},"supportedNodes":["toolWolframAlpha"],"iconUrl":"icons/@n8n/n8n-nodes-langchain/dist/nodes/tools/ToolWolframAlpha/wolfram-alpha.svg"},
|
|
33
33
|
{"name":"xAiApi","displayName":"xAi","documentationUrl":"xai","properties":[{"displayName":"API Key","name":"apiKey","type":"string","typeOptions":{"password":true},"required":true,"default":""},{"displayName":"Base URL","name":"url","type":"hidden","default":"https://api.x.ai/v1"}],"authenticate":{"type":"generic","properties":{"headers":{"Authorization":"=Bearer {{$credentials.apiKey}}"}}},"test":{"request":{"baseURL":"={{ $credentials.url }}","url":"/models"}},"supportedNodes":["lmChatXAiGrok"],"iconUrl":{"light":"icons/@n8n/n8n-nodes-langchain/dist/nodes/llms/LmChatXAiGrok/logo.dark.svg","dark":"icons/@n8n/n8n-nodes-langchain/dist/nodes/llms/LmChatXAiGrok/logo.svg"}},
|
|
34
34
|
{"name":"xataApi","displayName":"Xata Api","documentationUrl":"xata","properties":[{"displayName":"Database Endpoint","name":"databaseEndpoint","required":true,"type":"string","default":"","placeholder":"https://{workspace}.{region}.xata.sh/db/{database}"},{"displayName":"Branch","name":"branch","required":true,"type":"string","default":"main"},{"displayName":"API Key","name":"apiKey","type":"string","typeOptions":{"password":true},"required":true,"default":""}],"authenticate":{"type":"generic","properties":{"headers":{"Authorization":"=Bearer {{$credentials.apiKey}}"}}},"test":{"request":{"baseURL":"={{$credentials.databaseEndpoint}}:{{$credentials.branch}}"}},"supportedNodes":["memoryXata"],"iconUrl":"icons/@n8n/n8n-nodes-langchain/dist/nodes/memory/MemoryXata/xata.svg"},
|
package/dist/types/nodes.json
CHANGED
|
@@ -105,7 +105,7 @@
|
|
|
105
105
|
{"displayName":"Redis Vector Store","name":"vectorStoreRedis","description":"Work with your data in a Redis vector index","group":["transform"],"version":[1,1.1,1.2,1.3,1.4],"defaults":{"name":"Redis Vector Store"},"codex":{"categories":["AI"],"subcategories":{"AI":["Vector Stores","Tools","Root Nodes"],"Vector Stores":["Other Vector Stores"],"Tools":["Other Tools"]},"resources":{"primaryDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.vectorstoreredis/"}]}},"builderHint":{"searchHint":"Pick mode by where data flows: `insert` upserts documents into the store on the main flow; `load` runs a one-shot similarity search on the main flow; `retrieve-as-tool` is the canonical RAG mode — plug into an AI Agent's `subnodes.tools`; `retrieve` exposes the store as a subnode for another node's `subnodes.vectorStore`; `update` updates a single document by ID.","extraTypeDefContent":[{"displayOptions":{"show":{"mode":["insert"]}},"content":"Sits on the main flow — pipe the documents you want to embed into this node. Declare with `vectorStore({...})`. Required subnodes: `embedding` and `documentLoader`. If the goal is letting an LLM query the store, use `mode: 'retrieve-as-tool'` instead.\n<patterns>\n<pattern title=\"insert mode — upsert documents (generic, works for any vectorStore* node)\">\n// Substitute the type literal and provider-specific parameters (e.g. pineconeIndex,\n// qdrantCollection, supabaseTableName) — see the rest of this file for the exact shape.\nconst store = vectorStore({\n type: '@n8n/n8n-nodes-langchain.vectorStoreXxx',\n config: {\n name: 'Knowledge Base',\n parameters: {\n mode: 'insert',\n // ...provider-specific parameters\n },\n subnodes: { embedding: embeddingsOpenAi, documentLoader: defaultDataLoader }\n }\n});\n</pattern>\n</patterns>"},{"displayOptions":{"show":{"mode":["retrieve-as-tool"]}},"content":"Canonical RAG mode — declare with the `tool({...})` factory (NOT `vectorStore`) and plug into an AI Agent's `subnodes.tools`. Required subnodes: `embedding`. Set `toolDescription` so the agent knows when to call it.\n<patterns>\n<pattern title=\"retrieve-as-tool mode — RAG via AI Agent (generic, works for any vectorStore* node)\">\n// Substitute the type literal and provider-specific parameters — see the rest of this file\n// for the exact shape (e.g. pineconeIndex, qdrantCollection, supabaseTableName).\nconst knowledgeBase = tool({\n type: '@n8n/n8n-nodes-langchain.vectorStoreXxx',\n config: {\n name: 'Knowledge Base',\n parameters: {\n mode: 'retrieve-as-tool',\n toolDescription: 'Search the product knowledge base',\n // ...provider-specific parameters\n },\n subnodes: { embedding: embeddingsOpenAi }\n }\n});\n\nconst agent = node({\n type: '@n8n/n8n-nodes-langchain.agent',\n config: {\n name: 'Support Agent',\n parameters: { promptType: 'define', text: expr('{{ $json.question }}') },\n subnodes: { model: openAiModel, tools: [knowledgeBase] }\n }\n});\n</pattern>\n</patterns>"},{"displayOptions":{"show":{"mode":["load"]}},"content":"One-shot similarity search on the main flow using the `prompt` parameter. Declare with `vectorStore({...})`. Required subnodes: `embedding`. For LLM-driven querying (RAG), use `mode: 'retrieve-as-tool'` instead.\n<patterns>\n<pattern title=\"load mode — one-shot similarity search (generic)\">\n// Substitute the type literal and provider-specific parameters — see the rest of this file.\nconst lookup = vectorStore({\n type: '@n8n/n8n-nodes-langchain.vectorStoreXxx',\n config: {\n name: 'Knowledge Base',\n parameters: {\n mode: 'load',\n prompt: expr('{{ $json.query }}'),\n // ...provider-specific parameters\n },\n subnodes: { embedding: embeddingsOpenAi }\n }\n});\n</pattern>\n</patterns>"},{"displayOptions":{"show":{"mode":["retrieve"]}},"content":"Exposes the store as an `ai_vectorStore` subnode for another node (e.g. `toolVectorStore`). Declare with `vectorStore({...})`. Required subnodes: `embedding`. For RAG with an AI Agent directly, prefer `mode: 'retrieve-as-tool'`.\n<patterns>\n<pattern title=\"retrieve mode — feed another node as a subnode (generic)\">\n// Substitute the type literal and provider-specific parameters — see the rest of this file.\nconst store = vectorStore({\n type: '@n8n/n8n-nodes-langchain.vectorStoreXxx',\n config: {\n name: 'Knowledge Base',\n parameters: { mode: 'retrieve' /* + provider-specific parameters */ },\n subnodes: { embedding: embeddingsOpenAi }\n }\n});\n\nconst retrieverTool = tool({\n type: '@n8n/n8n-nodes-langchain.toolVectorStore',\n config: {\n name: 'KB Retriever',\n parameters: { description: 'Search the product knowledge base' },\n subnodes: { vectorStore: store, model: openAiModel }\n }\n});\n</pattern>\n</patterns>"},{"displayOptions":{"show":{"mode":["update"]}},"content":"Updates a single document by `id`. Declare with `vectorStore({...})`. Required subnodes: `embedding`. Only available on stores whose `operationModes` enables it — most providers omit this mode.\n<patterns>\n<pattern title=\"update mode — update document by ID (generic)\">\n// Substitute the type literal and provider-specific parameters — see the rest of this file.\nconst store = vectorStore({\n type: '@n8n/n8n-nodes-langchain.vectorStoreXxx',\n config: {\n name: 'Knowledge Base',\n parameters: { mode: 'update', id: expr('{{ $json.docId }}') },\n subnodes: { embedding: embeddingsOpenAi }\n }\n});\n</pattern>\n</patterns>"}],"inputs":{"ai_embedding":{"required":true},"ai_document":{"required":true,"displayOptions":{"show":{"mode":["insert"]}}},"ai_reranker":{"required":true,"displayOptions":{"show":{"mode":["load","retrieve","retrieve-as-tool"],"useReranker":[true]}}}},"outputs":{"main":{"displayOptions":{"show":{"mode":["insert","load","update"]}}},"ai_vectorStore":{"required":true,"displayOptions":{"show":{"mode":["retrieve"]}}},"ai_tool":{"required":true,"displayOptions":{"show":{"mode":["retrieve-as-tool"]}}}}},"credentials":[{"name":"redis","required":true}],"inputs":"={{\n\t\t\t((parameters) => {\n\t\t\t\tconst mode = parameters?.mode;\n\t\t\t\tconst useReranker = parameters?.useReranker;\n\t\t\t\tconst inputs = [{ displayName: \"Embedding\", type: \"ai_embedding\", required: true, maxConnections: 1}]\n\n\t\t\t\tif (['load', 'retrieve', 'retrieve-as-tool'].includes(mode) && useReranker) {\n\t\t\t\t\tinputs.push({ displayName: \"Reranker\", type: \"ai_reranker\", required: true, maxConnections: 1})\n\t\t\t\t}\n\n\t\t\t\tif (mode === 'retrieve-as-tool') {\n\t\t\t\t\treturn inputs;\n\t\t\t\t}\n\n\t\t\t\tif (['insert', 'load', 'update'].includes(mode)) {\n\t\t\t\t\tinputs.push({ displayName: \"\", type: \"main\"})\n\t\t\t\t}\n\n\t\t\t\tif (['insert'].includes(mode)) {\n\t\t\t\t\tinputs.push({ displayName: \"Document\", type: \"ai_document\", required: true, maxConnections: 1})\n\t\t\t\t}\n\t\t\t\treturn inputs\n\t\t\t})($parameter)\n\t\t}}","outputs":"={{\n\t\t\t((parameters) => {\n\t\t\t\tconst mode = parameters?.mode ?? 'retrieve';\n\n\t\t\t\tif (mode === 'retrieve-as-tool') {\n\t\t\t\t\treturn [{ displayName: \"Tool\", type: \"ai_tool\"}]\n\t\t\t\t}\n\n\t\t\t\tif (mode === 'retrieve') {\n\t\t\t\t\treturn [{ displayName: \"Vector Store\", type: \"ai_vectorStore\"}]\n\t\t\t\t}\n\t\t\t\treturn [{ displayName: \"\", type: \"main\"}]\n\t\t\t})($parameter)\n\t\t}}","properties":[{"displayName":"Tip: Get a feel for vector stores in n8n with our","name":"ragStarterCallout","type":"callout","typeOptions":{"calloutAction":{"label":"RAG starter template","type":"openSampleWorkflowTemplate","templateId":"rag-starter-template"}},"default":""},{"displayName":"Operation Mode","name":"mode","type":"options","noDataExpression":true,"default":"retrieve","options":[{"name":"Get Many","value":"load","description":"Get many ranked documents from vector store for query","action":"Get ranked documents from vector store"},{"name":"Insert Documents","value":"insert","description":"Insert documents into vector store","action":"Add documents to vector store"},{"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 Chain/Tool as Vector Store","outputConnectionType":"ai_vectorStore"},{"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 Agent as Tool","outputConnectionType":"ai_tool"},{"name":"Update Documents","value":"update","description":"Update documents in vector store by ID","action":"Update vector store documents"}]},{"displayName":"This node must be connected to a vector store retriever. <a data-action='openSelectiveNodeCreator' data-action-parameter-connectiontype='ai_retriever'>Insert one</a>","name":"notice","type":"notice","default":"","typeOptions":{"containerClass":"ndv-connection-hint-notice"},"displayOptions":{"show":{"mode":["retrieve"]}}},{"displayName":"Name","name":"toolName","type":"string","default":"","required":true,"description":"Name of the vector store","placeholder":"e.g. company_knowledge_base","validateType":"string-alphanumeric","displayOptions":{"show":{"@version":[{"_cnd":{"lte":1.2}}],"mode":["retrieve-as-tool"]}}},{"displayName":"Description","name":"toolDescription","type":"string","default":"","required":true,"typeOptions":{"rows":2},"description":"Explain to the LLM what this tool does, a good, specific description would allow LLMs to produce expected results much more often","placeholder":"e.g. Work with your data in a Redis vector index","displayOptions":{"show":{"mode":["retrieve-as-tool"]}}},{"displayName":"Redis Index","name":"redisIndex","type":"resourceLocator","default":{"mode":"list","value":""},"required":true,"modes":[{"displayName":"From List","name":"list","type":"list","typeOptions":{"searchListMethod":"redisIndexSearch"}},{"displayName":"ID","name":"id","type":"string"}]},{"displayName":"A newer version of this node supports advanced filtering and a custom metadata schema. To use it, add a new Redis Vector Store node with a new index, then reimport your documents. Don't point the new node at an index created by this version: metadata will be missing and filters will return wrong results. This node and its index keep working as they are.","name":"upgradeNotice","type":"notice","default":"","displayOptions":{"show":{"@version":[{"_cnd":{"lte":1.3}}]}}},{"displayName":"Embedding Batch Size","name":"embeddingBatchSize","type":"number","default":200,"description":"Number of documents to embed in a single batch","displayOptions":{"show":{"mode":["insert"],"@version":[{"_cnd":{"gte":1.1}}]}}},{"displayName":"Options","name":"options","type":"collection","placeholder":"Add Option","default":{},"options":[{"displayName":"Key Prefix","name":"keyPrefix","type":"string","description":"Prefix for Redis keys storing the documents","placeholder":"doc","default":""},{"displayName":"Overwrite Documents","name":"overwriteDocuments","type":"boolean","description":"Whether existing documents and the index should be overwritten","default":false},{"displayName":"Metadata Key","name":"metadataKey","type":"string","description":"The hash key to be used to store the metadata of the document","placeholder":"metadata","default":""},{"displayName":"Metadata Schema","name":"metadataSchema","type":"string","description":"JSON array defining metadata field types for indexing. If not provided, schema will be inferred from documents. Example: <code>[{\"name\": \"category\", \"type\": \"tag\"}, {\"name\": \"price\", \"type\": \"numeric\", \"options\": {\"sortable\": true}}]</code>","hint":"Learn more about metadata schema configuration <a target=\"_blank\" href=\"https://docs.langchain.com/oss/javascript/integrations/vectorstores/redis#advanced-features\">here</a>","placeholder":"[{\"name\": \"category\", \"type\": \"tag\"}, {\"name\": \"price\", \"type\": \"numeric\"}]","default":"","typeOptions":{"rows":4},"displayOptions":{"show":{"@version":[{"_cnd":{"gte":1.4}}]}}},{"displayName":"Content Key","name":"contentKey","type":"string","description":"The hash key to be used to store the content of the document","placeholder":"content","default":""},{"displayName":"Embedding Key","name":"vectorKey","type":"string","description":"The hash key to be used to store the embedding of the document","placeholder":"content_vector","default":""},{"displayName":"Time-To-Live","name":"ttl","description":"Time-to-live for the documents in seconds","placeholder":"0","type":"number","default":""}],"displayOptions":{"show":{"mode":["insert"]}}},{"displayName":"Prompt","name":"prompt","type":"string","default":"","required":true,"description":"Search prompt to retrieve matching documents from the vector store using similarity-based ranking","displayOptions":{"show":{"mode":["load"]}}},{"displayName":"Limit","name":"topK","type":"number","default":4,"description":"Number of top results to fetch from vector store","displayOptions":{"show":{"mode":["load","retrieve-as-tool"]}}},{"displayName":"Include Metadata","name":"includeDocumentMetadata","type":"boolean","default":true,"description":"Whether or not to include document metadata","displayOptions":{"show":{"mode":["load","retrieve-as-tool"]}}},{"displayName":"Rerank Results","name":"useReranker","type":"boolean","default":false,"description":"Whether or not to rerank results","displayOptions":{"show":{"mode":["load","retrieve","retrieve-as-tool"]}}},{"displayName":"ID","name":"id","type":"string","default":"","required":true,"description":"ID of an embedding entry","displayOptions":{"show":{"mode":["update"]}}},{"displayName":"Options","name":"options","type":"collection","placeholder":"Add Option","default":{},"options":[{"displayName":"Metadata Filter","name":"metadataFilter","type":"string","description":"The comma-separated list of words by which to apply additional full-text metadata filtering","placeholder":"Item1,Item2,Item3","default":"","displayOptions":{"show":{"@version":[{"_cnd":{"lte":1.3}}]}}},{"displayName":"Metadata Filter","name":"advancedFilter","type":"string","description":"Redis query filter expression. Supports Tag, Numeric, Text, Geo filters with AND/OR logic. Example: <code>@category:{electronics} @price:[0 100]</code>","hint":"Learn more about Redis vector search filtering <a target=\"_blank\" href=\"https://docs.langchain.com/oss/javascript/integrations/vectorstores/redis#advanced-features\">here</a>","placeholder":"@category:{electronics} @price:[0 100]","default":"","typeOptions":{"rows":3},"displayOptions":{"show":{"@version":[{"_cnd":{"gte":1.4}}]}}},{"displayName":"Metadata Schema","name":"metadataSchema","type":"string","description":"JSON array defining metadata field types for indexing. If not provided, schema will be inferred from documents. Example: <code>[{\"name\": \"category\", \"type\": \"tag\"}, {\"name\": \"price\", \"type\": \"numeric\", \"options\": {\"sortable\": true}}]</code>","hint":"Learn more about metadata schema configuration <a target=\"_blank\" href=\"https://docs.langchain.com/oss/javascript/integrations/vectorstores/redis#advanced-features\">here</a>","placeholder":"[{\"name\": \"category\", \"type\": \"tag\"}, {\"name\": \"price\", \"type\": \"numeric\"}]","default":"","typeOptions":{"rows":4},"displayOptions":{"show":{"@version":[{"_cnd":{"gte":1.4}}]}}},{"displayName":"Key Prefix","name":"keyPrefix","type":"string","description":"Prefix for Redis keys storing the documents","placeholder":"doc","default":""},{"displayName":"Metadata Key","name":"metadataKey","type":"string","description":"The hash key to be used to store the metadata of the document","placeholder":"metadata","default":""},{"displayName":"Content Key","name":"contentKey","type":"string","description":"The hash key to be used to store the content of the document","placeholder":"content","default":""},{"displayName":"Embedding Key","name":"vectorKey","type":"string","description":"The hash key to be used to store the embedding of the document","placeholder":"content_vector","default":""}],"displayOptions":{"show":{"mode":["load","retrieve-as-tool"]}}},{"displayName":"Options","name":"options","type":"collection","placeholder":"Add Option","default":{},"options":[{"displayName":"Metadata Filter","name":"metadataFilter","type":"string","description":"The comma-separated list of words by which to apply additional full-text metadata filtering","placeholder":"Item1,Item2,Item3","default":"","displayOptions":{"show":{"@version":[{"_cnd":{"lte":1.3}}]}}},{"displayName":"Metadata Filter","name":"advancedFilter","type":"string","description":"Redis query filter expression. Supports Tag, Numeric, Text, Geo filters with AND/OR logic. Example: <code>@category:{electronics} @price:[0 100]</code>","hint":"Learn more about Redis vector search filtering <a target=\"_blank\" href=\"https://docs.langchain.com/oss/javascript/integrations/vectorstores/redis#advanced-features\">here</a>","placeholder":"@category:{electronics} @price:[0 100]","default":"","typeOptions":{"rows":3},"displayOptions":{"show":{"@version":[{"_cnd":{"gte":1.4}}]}}},{"displayName":"Metadata Schema","name":"metadataSchema","type":"string","description":"JSON array defining metadata field types for indexing. If not provided, schema will be inferred from documents. Example: <code>[{\"name\": \"category\", \"type\": \"tag\"}, {\"name\": \"price\", \"type\": \"numeric\", \"options\": {\"sortable\": true}}]</code>","hint":"Learn more about metadata schema configuration <a target=\"_blank\" href=\"https://docs.langchain.com/oss/javascript/integrations/vectorstores/redis#advanced-features\">here</a>","placeholder":"[{\"name\": \"category\", \"type\": \"tag\"}, {\"name\": \"price\", \"type\": \"numeric\"}]","default":"","typeOptions":{"rows":4},"displayOptions":{"show":{"@version":[{"_cnd":{"gte":1.4}}]}}},{"displayName":"Key Prefix","name":"keyPrefix","type":"string","description":"Prefix for Redis keys storing the documents","placeholder":"doc","default":""},{"displayName":"Metadata Key","name":"metadataKey","type":"string","description":"The hash key to be used to store the metadata of the document","placeholder":"metadata","default":""},{"displayName":"Content Key","name":"contentKey","type":"string","description":"The hash key to be used to store the content of the document","placeholder":"content","default":""},{"displayName":"Embedding Key","name":"vectorKey","type":"string","description":"The hash key to be used to store the embedding of the document","placeholder":"content_vector","default":""}],"displayOptions":{"show":{"mode":["retrieve"]}}}],"iconUrl":{"light":"icons/@n8n/n8n-nodes-langchain/dist/nodes/vector_store/VectorStoreRedis/redis.svg","dark":"icons/@n8n/n8n-nodes-langchain/dist/nodes/vector_store/VectorStoreRedis/redis.dark.svg"}},
|
|
106
106
|
{"displayName":"Qdrant Vector Store","name":"vectorStoreQdrant","description":"Work with your data in a Qdrant collection","group":["transform"],"version":[1,1.1,1.2,1.3,1.4],"defaults":{"name":"Qdrant Vector Store"},"codex":{"categories":["AI"],"subcategories":{"AI":["Vector Stores","Tools","Root Nodes"],"Vector Stores":["Other Vector Stores"],"Tools":["Other Tools"]},"resources":{"primaryDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.vectorstoreqdrant/"}]}},"builderHint":{"searchHint":"Pick mode by where data flows: `insert` upserts documents into the store on the main flow; `load` runs a one-shot similarity search on the main flow; `retrieve-as-tool` is the canonical RAG mode — plug into an AI Agent's `subnodes.tools`; `retrieve` exposes the store as a subnode for another node's `subnodes.vectorStore`; `update` updates a single document by ID.","extraTypeDefContent":[{"displayOptions":{"show":{"mode":["insert"]}},"content":"Sits on the main flow — pipe the documents you want to embed into this node. Declare with `vectorStore({...})`. Required subnodes: `embedding` and `documentLoader`. If the goal is letting an LLM query the store, use `mode: 'retrieve-as-tool'` instead.\n<patterns>\n<pattern title=\"insert mode — upsert documents (generic, works for any vectorStore* node)\">\n// Substitute the type literal and provider-specific parameters (e.g. pineconeIndex,\n// qdrantCollection, supabaseTableName) — see the rest of this file for the exact shape.\nconst store = vectorStore({\n type: '@n8n/n8n-nodes-langchain.vectorStoreXxx',\n config: {\n name: 'Knowledge Base',\n parameters: {\n mode: 'insert',\n // ...provider-specific parameters\n },\n subnodes: { embedding: embeddingsOpenAi, documentLoader: defaultDataLoader }\n }\n});\n</pattern>\n</patterns>"},{"displayOptions":{"show":{"mode":["retrieve-as-tool"]}},"content":"Canonical RAG mode — declare with the `tool({...})` factory (NOT `vectorStore`) and plug into an AI Agent's `subnodes.tools`. Required subnodes: `embedding`. Set `toolDescription` so the agent knows when to call it.\n<patterns>\n<pattern title=\"retrieve-as-tool mode — RAG via AI Agent (generic, works for any vectorStore* node)\">\n// Substitute the type literal and provider-specific parameters — see the rest of this file\n// for the exact shape (e.g. pineconeIndex, qdrantCollection, supabaseTableName).\nconst knowledgeBase = tool({\n type: '@n8n/n8n-nodes-langchain.vectorStoreXxx',\n config: {\n name: 'Knowledge Base',\n parameters: {\n mode: 'retrieve-as-tool',\n toolDescription: 'Search the product knowledge base',\n // ...provider-specific parameters\n },\n subnodes: { embedding: embeddingsOpenAi }\n }\n});\n\nconst agent = node({\n type: '@n8n/n8n-nodes-langchain.agent',\n config: {\n name: 'Support Agent',\n parameters: { promptType: 'define', text: expr('{{ $json.question }}') },\n subnodes: { model: openAiModel, tools: [knowledgeBase] }\n }\n});\n</pattern>\n</patterns>"},{"displayOptions":{"show":{"mode":["load"]}},"content":"One-shot similarity search on the main flow using the `prompt` parameter. Declare with `vectorStore({...})`. Required subnodes: `embedding`. For LLM-driven querying (RAG), use `mode: 'retrieve-as-tool'` instead.\n<patterns>\n<pattern title=\"load mode — one-shot similarity search (generic)\">\n// Substitute the type literal and provider-specific parameters — see the rest of this file.\nconst lookup = vectorStore({\n type: '@n8n/n8n-nodes-langchain.vectorStoreXxx',\n config: {\n name: 'Knowledge Base',\n parameters: {\n mode: 'load',\n prompt: expr('{{ $json.query }}'),\n // ...provider-specific parameters\n },\n subnodes: { embedding: embeddingsOpenAi }\n }\n});\n</pattern>\n</patterns>"},{"displayOptions":{"show":{"mode":["retrieve"]}},"content":"Exposes the store as an `ai_vectorStore` subnode for another node (e.g. `toolVectorStore`). Declare with `vectorStore({...})`. Required subnodes: `embedding`. For RAG with an AI Agent directly, prefer `mode: 'retrieve-as-tool'`.\n<patterns>\n<pattern title=\"retrieve mode — feed another node as a subnode (generic)\">\n// Substitute the type literal and provider-specific parameters — see the rest of this file.\nconst store = vectorStore({\n type: '@n8n/n8n-nodes-langchain.vectorStoreXxx',\n config: {\n name: 'Knowledge Base',\n parameters: { mode: 'retrieve' /* + provider-specific parameters */ },\n subnodes: { embedding: embeddingsOpenAi }\n }\n});\n\nconst retrieverTool = tool({\n type: '@n8n/n8n-nodes-langchain.toolVectorStore',\n config: {\n name: 'KB Retriever',\n parameters: { description: 'Search the product knowledge base' },\n subnodes: { vectorStore: store, model: openAiModel }\n }\n});\n</pattern>\n</patterns>"},{"displayOptions":{"show":{"mode":["update"]}},"content":"Updates a single document by `id`. Declare with `vectorStore({...})`. Required subnodes: `embedding`. Only available on stores whose `operationModes` enables it — most providers omit this mode.\n<patterns>\n<pattern title=\"update mode — update document by ID (generic)\">\n// Substitute the type literal and provider-specific parameters — see the rest of this file.\nconst store = vectorStore({\n type: '@n8n/n8n-nodes-langchain.vectorStoreXxx',\n config: {\n name: 'Knowledge Base',\n parameters: { mode: 'update', id: expr('{{ $json.docId }}') },\n subnodes: { embedding: embeddingsOpenAi }\n }\n});\n</pattern>\n</patterns>"}],"inputs":{"ai_embedding":{"required":true},"ai_document":{"required":true,"displayOptions":{"show":{"mode":["insert"]}}},"ai_reranker":{"required":true,"displayOptions":{"show":{"mode":["load","retrieve","retrieve-as-tool"],"useReranker":[true]}}}},"outputs":{"main":{"displayOptions":{"show":{"mode":["insert","load","update"]}}},"ai_vectorStore":{"required":true,"displayOptions":{"show":{"mode":["retrieve"]}}},"ai_tool":{"required":true,"displayOptions":{"show":{"mode":["retrieve-as-tool"]}}}}},"credentials":[{"name":"qdrantApi","required":true}],"inputs":"={{\n\t\t\t((parameters) => {\n\t\t\t\tconst mode = parameters?.mode;\n\t\t\t\tconst useReranker = parameters?.useReranker;\n\t\t\t\tconst inputs = [{ displayName: \"Embedding\", type: \"ai_embedding\", required: true, maxConnections: 1}]\n\n\t\t\t\tif (['load', 'retrieve', 'retrieve-as-tool'].includes(mode) && useReranker) {\n\t\t\t\t\tinputs.push({ displayName: \"Reranker\", type: \"ai_reranker\", required: true, maxConnections: 1})\n\t\t\t\t}\n\n\t\t\t\tif (mode === 'retrieve-as-tool') {\n\t\t\t\t\treturn inputs;\n\t\t\t\t}\n\n\t\t\t\tif (['insert', 'load', 'update'].includes(mode)) {\n\t\t\t\t\tinputs.push({ displayName: \"\", type: \"main\"})\n\t\t\t\t}\n\n\t\t\t\tif (['insert'].includes(mode)) {\n\t\t\t\t\tinputs.push({ displayName: \"Document\", type: \"ai_document\", required: true, maxConnections: 1})\n\t\t\t\t}\n\t\t\t\treturn inputs\n\t\t\t})($parameter)\n\t\t}}","outputs":"={{\n\t\t\t((parameters) => {\n\t\t\t\tconst mode = parameters?.mode ?? 'retrieve';\n\n\t\t\t\tif (mode === 'retrieve-as-tool') {\n\t\t\t\t\treturn [{ displayName: \"Tool\", type: \"ai_tool\"}]\n\t\t\t\t}\n\n\t\t\t\tif (mode === 'retrieve') {\n\t\t\t\t\treturn [{ displayName: \"Vector Store\", type: \"ai_vectorStore\"}]\n\t\t\t\t}\n\t\t\t\treturn [{ displayName: \"\", type: \"main\"}]\n\t\t\t})($parameter)\n\t\t}}","properties":[{"displayName":"Tip: Get a feel for vector stores in n8n with our","name":"ragStarterCallout","type":"callout","typeOptions":{"calloutAction":{"label":"RAG starter template","type":"openSampleWorkflowTemplate","templateId":"rag-starter-template"}},"default":""},{"displayName":"Operation Mode","name":"mode","type":"options","noDataExpression":true,"default":"retrieve","options":[{"name":"Get Many","value":"load","description":"Get many ranked documents from vector store for query","action":"Get ranked documents from vector store"},{"name":"Insert Documents","value":"insert","description":"Insert documents into vector store","action":"Add documents to vector store"},{"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 Chain/Tool as Vector Store","outputConnectionType":"ai_vectorStore"},{"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 Agent as Tool","outputConnectionType":"ai_tool"}]},{"displayName":"This node must be connected to a vector store retriever. <a data-action='openSelectiveNodeCreator' data-action-parameter-connectiontype='ai_retriever'>Insert one</a>","name":"notice","type":"notice","default":"","typeOptions":{"containerClass":"ndv-connection-hint-notice"},"displayOptions":{"show":{"mode":["retrieve"]}}},{"displayName":"Name","name":"toolName","type":"string","default":"","required":true,"description":"Name of the vector store","placeholder":"e.g. company_knowledge_base","validateType":"string-alphanumeric","displayOptions":{"show":{"@version":[{"_cnd":{"lte":1.2}}],"mode":["retrieve-as-tool"]}}},{"displayName":"Description","name":"toolDescription","type":"string","default":"","required":true,"typeOptions":{"rows":2},"description":"Explain to the LLM what this tool does, a good, specific description would allow LLMs to produce expected results much more often","placeholder":"e.g. Work with your data in a Qdrant collection","displayOptions":{"show":{"mode":["retrieve-as-tool"]}}},{"displayName":"Qdrant Collection","name":"qdrantCollection","type":"resourceLocator","default":{"mode":"list","value":""},"required":true,"modes":[{"displayName":"From List","name":"list","type":"list","typeOptions":{"searchListMethod":"qdrantCollectionsSearch"}},{"displayName":"ID","name":"id","type":"string"}]},{"displayName":"Embedding Batch Size","name":"embeddingBatchSize","type":"number","default":200,"description":"Number of documents to embed in a single batch","displayOptions":{"show":{"mode":["insert"],"@version":[{"_cnd":{"gte":1.1}}]}}},{"displayName":"Options","name":"options","type":"collection","placeholder":"Add Option","default":{},"options":[{"displayName":"Collection Config","name":"collectionConfig","type":"json","default":"","description":"JSON options for creating a collection. <a href=\"https://qdrant.tech/documentation/concepts/collections\">Learn more</a>."},{"displayName":"Content Payload Key","name":"contentPayloadKey","type":"string","default":"content","description":"The key to use for the content payload in Qdrant. Default is \"content\"."},{"displayName":"Metadata Payload Key","name":"metadataPayloadKey","type":"string","default":"metadata","description":"The key to use for the metadata payload in Qdrant. Default is \"metadata\"."}],"displayOptions":{"show":{"mode":["insert"]}}},{"displayName":"Prompt","name":"prompt","type":"string","default":"","required":true,"description":"Search prompt to retrieve matching documents from the vector store using similarity-based ranking","displayOptions":{"show":{"mode":["load"]}}},{"displayName":"Limit","name":"topK","type":"number","default":4,"description":"Number of top results to fetch from vector store","displayOptions":{"show":{"mode":["load","retrieve-as-tool"]}}},{"displayName":"Include Metadata","name":"includeDocumentMetadata","type":"boolean","default":true,"description":"Whether or not to include document metadata","displayOptions":{"show":{"mode":["load","retrieve-as-tool"]}}},{"displayName":"Rerank Results","name":"useReranker","type":"boolean","default":false,"description":"Whether or not to rerank results","displayOptions":{"show":{"mode":["load","retrieve","retrieve-as-tool"]}}},{"displayName":"ID","name":"id","type":"string","default":"","required":true,"description":"ID of an embedding entry","displayOptions":{"show":{"mode":["update"]}}},{"displayName":"Options","name":"options","type":"collection","placeholder":"Add Option","default":{},"options":[{"displayName":"Search Filter","name":"searchFilterJson","type":"json","typeOptions":{"rows":5},"default":"{\n \"should\": [\n {\n \"key\": \"metadata.batch\",\n \"match\": {\n \"value\": 12345\n }\n }\n ]\n}","validateType":"object","description":"Filter pageContent or metadata using this <a href=\"https://qdrant.tech/documentation/concepts/filtering/\" target=\"_blank\">filtering syntax</a>"},{"displayName":"Content Payload Key","name":"contentPayloadKey","type":"string","default":"content","description":"The key to use for the content payload in Qdrant. Default is \"content\"."},{"displayName":"Metadata Payload Key","name":"metadataPayloadKey","type":"string","default":"metadata","description":"The key to use for the metadata payload in Qdrant. Default is \"metadata\"."}],"displayOptions":{"show":{"mode":["load","retrieve-as-tool"]}}},{"displayName":"Options","name":"options","type":"collection","placeholder":"Add Option","default":{},"options":[{"displayName":"Search Filter","name":"searchFilterJson","type":"json","typeOptions":{"rows":5},"default":"{\n \"should\": [\n {\n \"key\": \"metadata.batch\",\n \"match\": {\n \"value\": 12345\n }\n }\n ]\n}","validateType":"object","description":"Filter pageContent or metadata using this <a href=\"https://qdrant.tech/documentation/concepts/filtering/\" target=\"_blank\">filtering syntax</a>"},{"displayName":"Content Payload Key","name":"contentPayloadKey","type":"string","default":"content","description":"The key to use for the content payload in Qdrant. Default is \"content\"."},{"displayName":"Metadata Payload Key","name":"metadataPayloadKey","type":"string","default":"metadata","description":"The key to use for the metadata payload in Qdrant. Default is \"metadata\"."}],"displayOptions":{"show":{"mode":["retrieve"]}}}],"iconUrl":"icons/@n8n/n8n-nodes-langchain/dist/nodes/vector_store/VectorStoreQdrant/qdrant.svg"},
|
|
107
107
|
{"displayName":"Supabase Vector Store","name":"vectorStoreSupabase","description":"Work with your data in Supabase Vector Store","group":["transform"],"version":[1,1.1,1.2,1.3,1.4],"defaults":{"name":"Supabase Vector Store"},"codex":{"categories":["AI"],"subcategories":{"AI":["Vector Stores","Tools","Root Nodes"],"Vector Stores":["Other Vector Stores"],"Tools":["Other Tools"]},"resources":{"primaryDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.vectorstoresupabase/"}]}},"builderHint":{"searchHint":"Pick mode by where data flows: `insert` upserts documents into the store on the main flow; `load` runs a one-shot similarity search on the main flow; `retrieve-as-tool` is the canonical RAG mode — plug into an AI Agent's `subnodes.tools`; `retrieve` exposes the store as a subnode for another node's `subnodes.vectorStore`; `update` updates a single document by ID.","extraTypeDefContent":[{"displayOptions":{"show":{"mode":["insert"]}},"content":"Sits on the main flow — pipe the documents you want to embed into this node. Declare with `vectorStore({...})`. Required subnodes: `embedding` and `documentLoader`. If the goal is letting an LLM query the store, use `mode: 'retrieve-as-tool'` instead.\n<patterns>\n<pattern title=\"insert mode — upsert documents (generic, works for any vectorStore* node)\">\n// Substitute the type literal and provider-specific parameters (e.g. pineconeIndex,\n// qdrantCollection, supabaseTableName) — see the rest of this file for the exact shape.\nconst store = vectorStore({\n type: '@n8n/n8n-nodes-langchain.vectorStoreXxx',\n config: {\n name: 'Knowledge Base',\n parameters: {\n mode: 'insert',\n // ...provider-specific parameters\n },\n subnodes: { embedding: embeddingsOpenAi, documentLoader: defaultDataLoader }\n }\n});\n</pattern>\n</patterns>"},{"displayOptions":{"show":{"mode":["retrieve-as-tool"]}},"content":"Canonical RAG mode — declare with the `tool({...})` factory (NOT `vectorStore`) and plug into an AI Agent's `subnodes.tools`. Required subnodes: `embedding`. Set `toolDescription` so the agent knows when to call it.\n<patterns>\n<pattern title=\"retrieve-as-tool mode — RAG via AI Agent (generic, works for any vectorStore* node)\">\n// Substitute the type literal and provider-specific parameters — see the rest of this file\n// for the exact shape (e.g. pineconeIndex, qdrantCollection, supabaseTableName).\nconst knowledgeBase = tool({\n type: '@n8n/n8n-nodes-langchain.vectorStoreXxx',\n config: {\n name: 'Knowledge Base',\n parameters: {\n mode: 'retrieve-as-tool',\n toolDescription: 'Search the product knowledge base',\n // ...provider-specific parameters\n },\n subnodes: { embedding: embeddingsOpenAi }\n }\n});\n\nconst agent = node({\n type: '@n8n/n8n-nodes-langchain.agent',\n config: {\n name: 'Support Agent',\n parameters: { promptType: 'define', text: expr('{{ $json.question }}') },\n subnodes: { model: openAiModel, tools: [knowledgeBase] }\n }\n});\n</pattern>\n</patterns>"},{"displayOptions":{"show":{"mode":["load"]}},"content":"One-shot similarity search on the main flow using the `prompt` parameter. Declare with `vectorStore({...})`. Required subnodes: `embedding`. For LLM-driven querying (RAG), use `mode: 'retrieve-as-tool'` instead.\n<patterns>\n<pattern title=\"load mode — one-shot similarity search (generic)\">\n// Substitute the type literal and provider-specific parameters — see the rest of this file.\nconst lookup = vectorStore({\n type: '@n8n/n8n-nodes-langchain.vectorStoreXxx',\n config: {\n name: 'Knowledge Base',\n parameters: {\n mode: 'load',\n prompt: expr('{{ $json.query }}'),\n // ...provider-specific parameters\n },\n subnodes: { embedding: embeddingsOpenAi }\n }\n});\n</pattern>\n</patterns>"},{"displayOptions":{"show":{"mode":["retrieve"]}},"content":"Exposes the store as an `ai_vectorStore` subnode for another node (e.g. `toolVectorStore`). Declare with `vectorStore({...})`. Required subnodes: `embedding`. For RAG with an AI Agent directly, prefer `mode: 'retrieve-as-tool'`.\n<patterns>\n<pattern title=\"retrieve mode — feed another node as a subnode (generic)\">\n// Substitute the type literal and provider-specific parameters — see the rest of this file.\nconst store = vectorStore({\n type: '@n8n/n8n-nodes-langchain.vectorStoreXxx',\n config: {\n name: 'Knowledge Base',\n parameters: { mode: 'retrieve' /* + provider-specific parameters */ },\n subnodes: { embedding: embeddingsOpenAi }\n }\n});\n\nconst retrieverTool = tool({\n type: '@n8n/n8n-nodes-langchain.toolVectorStore',\n config: {\n name: 'KB Retriever',\n parameters: { description: 'Search the product knowledge base' },\n subnodes: { vectorStore: store, model: openAiModel }\n }\n});\n</pattern>\n</patterns>"},{"displayOptions":{"show":{"mode":["update"]}},"content":"Updates a single document by `id`. Declare with `vectorStore({...})`. Required subnodes: `embedding`. Only available on stores whose `operationModes` enables it — most providers omit this mode.\n<patterns>\n<pattern title=\"update mode — update document by ID (generic)\">\n// Substitute the type literal and provider-specific parameters — see the rest of this file.\nconst store = vectorStore({\n type: '@n8n/n8n-nodes-langchain.vectorStoreXxx',\n config: {\n name: 'Knowledge Base',\n parameters: { mode: 'update', id: expr('{{ $json.docId }}') },\n subnodes: { embedding: embeddingsOpenAi }\n }\n});\n</pattern>\n</patterns>"}],"inputs":{"ai_embedding":{"required":true},"ai_document":{"required":true,"displayOptions":{"show":{"mode":["insert"]}}},"ai_reranker":{"required":true,"displayOptions":{"show":{"mode":["load","retrieve","retrieve-as-tool"],"useReranker":[true]}}}},"outputs":{"main":{"displayOptions":{"show":{"mode":["insert","load","update"]}}},"ai_vectorStore":{"required":true,"displayOptions":{"show":{"mode":["retrieve"]}}},"ai_tool":{"required":true,"displayOptions":{"show":{"mode":["retrieve-as-tool"]}}}}},"credentials":[{"name":"supabaseApi","required":true}],"inputs":"={{\n\t\t\t((parameters) => {\n\t\t\t\tconst mode = parameters?.mode;\n\t\t\t\tconst useReranker = parameters?.useReranker;\n\t\t\t\tconst inputs = [{ displayName: \"Embedding\", type: \"ai_embedding\", required: true, maxConnections: 1}]\n\n\t\t\t\tif (['load', 'retrieve', 'retrieve-as-tool'].includes(mode) && useReranker) {\n\t\t\t\t\tinputs.push({ displayName: \"Reranker\", type: \"ai_reranker\", required: true, maxConnections: 1})\n\t\t\t\t}\n\n\t\t\t\tif (mode === 'retrieve-as-tool') {\n\t\t\t\t\treturn inputs;\n\t\t\t\t}\n\n\t\t\t\tif (['insert', 'load', 'update'].includes(mode)) {\n\t\t\t\t\tinputs.push({ displayName: \"\", type: \"main\"})\n\t\t\t\t}\n\n\t\t\t\tif (['insert'].includes(mode)) {\n\t\t\t\t\tinputs.push({ displayName: \"Document\", type: \"ai_document\", required: true, maxConnections: 1})\n\t\t\t\t}\n\t\t\t\treturn inputs\n\t\t\t})($parameter)\n\t\t}}","outputs":"={{\n\t\t\t((parameters) => {\n\t\t\t\tconst mode = parameters?.mode ?? 'retrieve';\n\n\t\t\t\tif (mode === 'retrieve-as-tool') {\n\t\t\t\t\treturn [{ displayName: \"Tool\", type: \"ai_tool\"}]\n\t\t\t\t}\n\n\t\t\t\tif (mode === 'retrieve') {\n\t\t\t\t\treturn [{ displayName: \"Vector Store\", type: \"ai_vectorStore\"}]\n\t\t\t\t}\n\t\t\t\treturn [{ displayName: \"\", type: \"main\"}]\n\t\t\t})($parameter)\n\t\t}}","properties":[{"displayName":"Tip: Get a feel for vector stores in n8n with our","name":"ragStarterCallout","type":"callout","typeOptions":{"calloutAction":{"label":"RAG starter template","type":"openSampleWorkflowTemplate","templateId":"rag-starter-template"}},"default":""},{"displayName":"Operation Mode","name":"mode","type":"options","noDataExpression":true,"default":"retrieve","options":[{"name":"Get Many","value":"load","description":"Get many ranked documents from vector store for query","action":"Get ranked documents from vector store"},{"name":"Insert Documents","value":"insert","description":"Insert documents into vector store","action":"Add documents to vector store"},{"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 Chain/Tool as Vector Store","outputConnectionType":"ai_vectorStore"},{"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 Agent as Tool","outputConnectionType":"ai_tool"},{"name":"Update Documents","value":"update","description":"Update documents in vector store by ID","action":"Update vector store documents"}]},{"displayName":"This node must be connected to a vector store retriever. <a data-action='openSelectiveNodeCreator' data-action-parameter-connectiontype='ai_retriever'>Insert one</a>","name":"notice","type":"notice","default":"","typeOptions":{"containerClass":"ndv-connection-hint-notice"},"displayOptions":{"show":{"mode":["retrieve"]}}},{"displayName":"Name","name":"toolName","type":"string","default":"","required":true,"description":"Name of the vector store","placeholder":"e.g. company_knowledge_base","validateType":"string-alphanumeric","displayOptions":{"show":{"@version":[{"_cnd":{"lte":1.2}}],"mode":["retrieve-as-tool"]}}},{"displayName":"Description","name":"toolDescription","type":"string","default":"","required":true,"typeOptions":{"rows":2},"description":"Explain to the LLM what this tool does, a good, specific description would allow LLMs to produce expected results much more often","placeholder":"e.g. Work with your data in Supabase Vector Store","displayOptions":{"show":{"mode":["retrieve-as-tool"]}}},{"displayName":"Table Name","name":"tableName","type":"resourceLocator","default":{"mode":"list","value":""},"required":true,"modes":[{"displayName":"From List","name":"list","type":"list","typeOptions":{"searchListMethod":"supabaseTableNameSearch"}},{"displayName":"ID","name":"id","type":"string"}]},{"displayName":"Embedding Batch Size","name":"embeddingBatchSize","type":"number","default":200,"description":"Number of documents to embed in a single batch","displayOptions":{"show":{"mode":["insert"],"@version":[{"_cnd":{"gte":1.1}}]}}},{"displayName":"Options","name":"options","type":"collection","placeholder":"Add Option","default":{},"options":[{"displayName":"Query Name","name":"queryName","type":"string","default":"match_documents","description":"Name of the query to use for matching documents"}],"displayOptions":{"show":{"mode":["insert"]}}},{"displayName":"Prompt","name":"prompt","type":"string","default":"","required":true,"description":"Search prompt to retrieve matching documents from the vector store using similarity-based ranking","displayOptions":{"show":{"mode":["load"]}}},{"displayName":"Limit","name":"topK","type":"number","default":4,"description":"Number of top results to fetch from vector store","displayOptions":{"show":{"mode":["load","retrieve-as-tool"]}}},{"displayName":"Include Metadata","name":"includeDocumentMetadata","type":"boolean","default":true,"description":"Whether or not to include document metadata","displayOptions":{"show":{"mode":["load","retrieve-as-tool"]}}},{"displayName":"Rerank Results","name":"useReranker","type":"boolean","default":false,"description":"Whether or not to rerank results","displayOptions":{"show":{"mode":["load","retrieve","retrieve-as-tool"]}}},{"displayName":"ID","name":"id","type":"string","default":"","required":true,"description":"ID of an embedding entry","displayOptions":{"show":{"mode":["update"]}}},{"displayName":"Options","name":"options","type":"collection","placeholder":"Add Option","default":{},"options":[{"displayName":"Query Name","name":"queryName","type":"string","default":"match_documents","description":"Name of the query to use for matching documents"},{"displayName":"Metadata Filter","name":"metadata","type":"fixedCollection","description":"Metadata to filter the document by","typeOptions":{"multipleValues":true},"default":{},"placeholder":"Add filter field","options":[{"name":"metadataValues","displayName":"Fields to Set","values":[{"displayName":"Name","name":"name","type":"string","default":"","required":true},{"displayName":"Value","name":"value","type":"string","default":""}]}]}],"displayOptions":{"show":{"mode":["load","retrieve-as-tool"]}}},{"displayName":"Options","name":"options","type":"collection","placeholder":"Add Option","default":{},"options":[{"displayName":"Query Name","name":"queryName","type":"string","default":"match_documents","description":"Name of the query to use for matching documents"},{"displayName":"Metadata Filter","name":"metadata","type":"fixedCollection","description":"Metadata to filter the document by","typeOptions":{"multipleValues":true},"default":{},"placeholder":"Add filter field","options":[{"name":"metadataValues","displayName":"Fields to Set","values":[{"displayName":"Name","name":"name","type":"string","default":"","required":true},{"displayName":"Value","name":"value","type":"string","default":""}]}]}],"displayOptions":{"show":{"mode":["retrieve"]}}},{"displayName":"Options","name":"options","type":"collection","placeholder":"Add Option","default":{},"options":[{"displayName":"Query Name","name":"queryName","type":"string","default":"match_documents","description":"Name of the query to use for matching documents"}],"displayOptions":{"show":{"mode":["update"]}}}],"iconUrl":"icons/@n8n/n8n-nodes-langchain/dist/nodes/vector_store/VectorStoreSupabase/supabase.svg"},
|
|
108
|
-
{"displayName":"Weaviate Vector Store","name":"vectorStoreWeaviate","description":"Work with your data in a Weaviate Cluster","group":["transform"],"version":[1,1.1,1.2,1.3,1.4],"defaults":{"name":"Weaviate Vector Store"},"codex":{"categories":["AI"],"subcategories":{"AI":["Vector Stores","Tools","Root Nodes"],"Vector Stores":["Other Vector Stores"],"Tools":["Other Tools"]},"resources":{"primaryDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.vectorstoreweaviate/"}]}},"builderHint":{"searchHint":"Pick mode by where data flows: `insert` upserts documents into the store on the main flow; `load` runs a one-shot similarity search on the main flow; `retrieve-as-tool` is the canonical RAG mode — plug into an AI Agent's `subnodes.tools`; `retrieve` exposes the store as a subnode for another node's `subnodes.vectorStore`; `update` updates a single document by ID.","extraTypeDefContent":[{"displayOptions":{"show":{"mode":["insert"]}},"content":"Sits on the main flow — pipe the documents you want to embed into this node. Declare with `vectorStore({...})`. Required subnodes: `embedding` and `documentLoader`. If the goal is letting an LLM query the store, use `mode: 'retrieve-as-tool'` instead.\n<patterns>\n<pattern title=\"insert mode — upsert documents (generic, works for any vectorStore* node)\">\n// Substitute the type literal and provider-specific parameters (e.g. pineconeIndex,\n// qdrantCollection, supabaseTableName) — see the rest of this file for the exact shape.\nconst store = vectorStore({\n type: '@n8n/n8n-nodes-langchain.vectorStoreXxx',\n config: {\n name: 'Knowledge Base',\n parameters: {\n mode: 'insert',\n // ...provider-specific parameters\n },\n subnodes: { embedding: embeddingsOpenAi, documentLoader: defaultDataLoader }\n }\n});\n</pattern>\n</patterns>"},{"displayOptions":{"show":{"mode":["retrieve-as-tool"]}},"content":"Canonical RAG mode — declare with the `tool({...})` factory (NOT `vectorStore`) and plug into an AI Agent's `subnodes.tools`. Required subnodes: `embedding`. Set `toolDescription` so the agent knows when to call it.\n<patterns>\n<pattern title=\"retrieve-as-tool mode — RAG via AI Agent (generic, works for any vectorStore* node)\">\n// Substitute the type literal and provider-specific parameters — see the rest of this file\n// for the exact shape (e.g. pineconeIndex, qdrantCollection, supabaseTableName).\nconst knowledgeBase = tool({\n type: '@n8n/n8n-nodes-langchain.vectorStoreXxx',\n config: {\n name: 'Knowledge Base',\n parameters: {\n mode: 'retrieve-as-tool',\n toolDescription: 'Search the product knowledge base',\n // ...provider-specific parameters\n },\n subnodes: { embedding: embeddingsOpenAi }\n }\n});\n\nconst agent = node({\n type: '@n8n/n8n-nodes-langchain.agent',\n config: {\n name: 'Support Agent',\n parameters: { promptType: 'define', text: expr('{{ $json.question }}') },\n subnodes: { model: openAiModel, tools: [knowledgeBase] }\n }\n});\n</pattern>\n</patterns>"},{"displayOptions":{"show":{"mode":["load"]}},"content":"One-shot similarity search on the main flow using the `prompt` parameter. Declare with `vectorStore({...})`. Required subnodes: `embedding`. For LLM-driven querying (RAG), use `mode: 'retrieve-as-tool'` instead.\n<patterns>\n<pattern title=\"load mode — one-shot similarity search (generic)\">\n// Substitute the type literal and provider-specific parameters — see the rest of this file.\nconst lookup = vectorStore({\n type: '@n8n/n8n-nodes-langchain.vectorStoreXxx',\n config: {\n name: 'Knowledge Base',\n parameters: {\n mode: 'load',\n prompt: expr('{{ $json.query }}'),\n // ...provider-specific parameters\n },\n subnodes: { embedding: embeddingsOpenAi }\n }\n});\n</pattern>\n</patterns>"},{"displayOptions":{"show":{"mode":["retrieve"]}},"content":"Exposes the store as an `ai_vectorStore` subnode for another node (e.g. `toolVectorStore`). Declare with `vectorStore({...})`. Required subnodes: `embedding`. For RAG with an AI Agent directly, prefer `mode: 'retrieve-as-tool'`.\n<patterns>\n<pattern title=\"retrieve mode — feed another node as a subnode (generic)\">\n// Substitute the type literal and provider-specific parameters — see the rest of this file.\nconst store = vectorStore({\n type: '@n8n/n8n-nodes-langchain.vectorStoreXxx',\n config: {\n name: 'Knowledge Base',\n parameters: { mode: 'retrieve' /* + provider-specific parameters */ },\n subnodes: { embedding: embeddingsOpenAi }\n }\n});\n\nconst retrieverTool = tool({\n type: '@n8n/n8n-nodes-langchain.toolVectorStore',\n config: {\n name: 'KB Retriever',\n parameters: { description: 'Search the product knowledge base' },\n subnodes: { vectorStore: store, model: openAiModel }\n }\n});\n</pattern>\n</patterns>"},{"displayOptions":{"show":{"mode":["update"]}},"content":"Updates a single document by `id`. Declare with `vectorStore({...})`. Required subnodes: `embedding`. Only available on stores whose `operationModes` enables it — most providers omit this mode.\n<patterns>\n<pattern title=\"update mode — update document by ID (generic)\">\n// Substitute the type literal and provider-specific parameters — see the rest of this file.\nconst store = vectorStore({\n type: '@n8n/n8n-nodes-langchain.vectorStoreXxx',\n config: {\n name: 'Knowledge Base',\n parameters: { mode: 'update', id: expr('{{ $json.docId }}') },\n subnodes: { embedding: embeddingsOpenAi }\n }\n});\n</pattern>\n</patterns>"}],"inputs":{"ai_embedding":{"required":true},"ai_document":{"required":true,"displayOptions":{"show":{"mode":["insert"]}}},"ai_reranker":{"required":true,"displayOptions":{"show":{"mode":["load","retrieve","retrieve-as-tool"],"useReranker":[true]}}}},"outputs":{"main":{"displayOptions":{"show":{"mode":["insert","load","update"]}}},"ai_vectorStore":{"required":true,"displayOptions":{"show":{"mode":["retrieve"]}}},"ai_tool":{"required":true,"displayOptions":{"show":{"mode":["retrieve-as-tool"]}}}}},"credentials":[{"name":"weaviateApi","required":true}],"inputs":"={{\n\t\t\t((parameters) => {\n\t\t\t\tconst mode = parameters?.mode;\n\t\t\t\tconst useReranker = parameters?.useReranker;\n\t\t\t\tconst inputs = [{ displayName: \"Embedding\", type: \"ai_embedding\", required: true, maxConnections: 1}]\n\n\t\t\t\tif (['load', 'retrieve', 'retrieve-as-tool'].includes(mode) && useReranker) {\n\t\t\t\t\tinputs.push({ displayName: \"Reranker\", type: \"ai_reranker\", required: true, maxConnections: 1})\n\t\t\t\t}\n\n\t\t\t\tif (mode === 'retrieve-as-tool') {\n\t\t\t\t\treturn inputs;\n\t\t\t\t}\n\n\t\t\t\tif (['insert', 'load', 'update'].includes(mode)) {\n\t\t\t\t\tinputs.push({ displayName: \"\", type: \"main\"})\n\t\t\t\t}\n\n\t\t\t\tif (['insert'].includes(mode)) {\n\t\t\t\t\tinputs.push({ displayName: \"Document\", type: \"ai_document\", required: true, maxConnections: 1})\n\t\t\t\t}\n\t\t\t\treturn inputs\n\t\t\t})($parameter)\n\t\t}}","outputs":"={{\n\t\t\t((parameters) => {\n\t\t\t\tconst mode = parameters?.mode ?? 'retrieve';\n\n\t\t\t\tif (mode === 'retrieve-as-tool') {\n\t\t\t\t\treturn [{ displayName: \"Tool\", type: \"ai_tool\"}]\n\t\t\t\t}\n\n\t\t\t\tif (mode === 'retrieve') {\n\t\t\t\t\treturn [{ displayName: \"Vector Store\", type: \"ai_vectorStore\"}]\n\t\t\t\t}\n\t\t\t\treturn [{ displayName: \"\", type: \"main\"}]\n\t\t\t})($parameter)\n\t\t}}","properties":[{"displayName":"Tip: Get a feel for vector stores in n8n with our","name":"ragStarterCallout","type":"callout","typeOptions":{"calloutAction":{"label":"RAG starter template","type":"openSampleWorkflowTemplate","templateId":"rag-starter-template"}},"default":""},{"displayName":"Operation Mode","name":"mode","type":"options","noDataExpression":true,"default":"retrieve","options":[{"name":"Get Many","value":"load","description":"Get many ranked documents from vector store for query","action":"Get ranked documents from vector store"},{"name":"Insert Documents","value":"insert","description":"Insert documents into vector store","action":"Add documents to vector store"},{"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 Chain/Tool as Vector Store","outputConnectionType":"ai_vectorStore"},{"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 Agent as Tool","outputConnectionType":"ai_tool"}]},{"displayName":"This node must be connected to a vector store retriever. <a data-action='openSelectiveNodeCreator' data-action-parameter-connectiontype='ai_retriever'>Insert one</a>","name":"notice","type":"notice","default":"","typeOptions":{"containerClass":"ndv-connection-hint-notice"},"displayOptions":{"show":{"mode":["retrieve"]}}},{"displayName":"Name","name":"toolName","type":"string","default":"","required":true,"description":"Name of the vector store","placeholder":"e.g. company_knowledge_base","validateType":"string-alphanumeric","displayOptions":{"show":{"@version":[{"_cnd":{"lte":1.2}}],"mode":["retrieve-as-tool"]}}},{"displayName":"Description","name":"toolDescription","type":"string","default":"","required":true,"typeOptions":{"rows":2},"description":"Explain to the LLM what this tool does, a good, specific description would allow LLMs to produce expected results much more often","placeholder":"e.g. Work with your data in a Weaviate Cluster","displayOptions":{"show":{"mode":["retrieve-as-tool"]}}},{"displayName":"Weaviate Collection","name":"weaviateCollection","type":"resourceLocator","default":{"mode":"list","value":""},"required":true,"modes":[{"displayName":"From List","name":"list","type":"list","typeOptions":{"searchListMethod":"weaviateCollectionsSearch"}},{"displayName":"ID","name":"id","type":"string"}]},{"displayName":"Embedding Batch Size","name":"embeddingBatchSize","type":"number","default":200,"description":"Number of documents to embed in a single batch","displayOptions":{"show":{"mode":["insert"],"@version":[{"_cnd":{"gte":1.1}}]}}},{"displayName":"Options","name":"options","type":"collection","placeholder":"Add Option","default":{},"options":[{"displayName":"Tenant Name","name":"tenant","type":"string","default":"","validateType":"string","description":"Tenant Name. Collection must have been created with tenant support enabled."},{"displayName":"Text Key","name":"textKey","type":"string","default":"text","validateType":"string","description":"The key in the document that contains the embedded text"},{"displayName":"Skip Init Checks","name":"skip_init_checks","type":"boolean","default":false,"validateType":"boolean","description":"Whether to skip init checks while instantiating the client"},{"displayName":"Init Timeout","name":"timeout_init","type":"number","default":2,"validateType":"number","description":"Number of timeout seconds for initial checks"},{"displayName":"Insert Timeout","name":"timeout_insert","type":"number","default":90,"validateType":"number","description":"Number of timeout seconds for inserts"},{"displayName":"Query Timeout","name":"timeout_query","type":"number","default":30,"validateType":"number","description":"Number of timeout seconds for queries"},{"displayName":"GRPC Proxy","name":"proxy_grpc","type":"string","default":"","validateType":"string","description":"Proxy to use for GRPC"},{"displayName":"Clear Data","name":"clearStore","type":"boolean","default":false,"description":"Whether to clear the Collection/Tenant before inserting new data"}],"displayOptions":{"show":{"mode":["insert"]}}},{"displayName":"Prompt","name":"prompt","type":"string","default":"","required":true,"description":"Search prompt to retrieve matching documents from the vector store using similarity-based ranking","displayOptions":{"show":{"mode":["load"]}}},{"displayName":"Limit","name":"topK","type":"number","default":4,"description":"Number of top results to fetch from vector store","displayOptions":{"show":{"mode":["load","retrieve-as-tool"]}}},{"displayName":"Include Metadata","name":"includeDocumentMetadata","type":"boolean","default":true,"description":"Whether or not to include document metadata","displayOptions":{"show":{"mode":["load","retrieve-as-tool"]}}},{"displayName":"Rerank Results","name":"useReranker","type":"boolean","default":false,"description":"Whether or not to rerank results","displayOptions":{"show":{"mode":["load","retrieve","retrieve-as-tool"]}}},{"displayName":"ID","name":"id","type":"string","default":"","required":true,"description":"ID of an embedding entry","displayOptions":{"show":{"mode":["update"]}}},{"displayName":"Options","name":"options","type":"collection","placeholder":"Add Option","default":{},"options":[{"displayName":"Search Filters","name":"searchFilterJson","type":"json","typeOptions":{"rows":5},"default":"{\n \"OR\": [\n {\n \"path\": [\"pdf_info_Author\"],\n \"operator\": \"Equal\",\n \"valueString\": \"Elis\"\n },\n {\n \"path\": [\"pdf_info_Author\"],\n \"operator\": \"Equal\",\n \"valueString\": \"Pinnacle\"\n } \n ]\n}","validateType":"object","description":"Filter pageContent or metadata using this <a href=\"https://weaviate.io/\" target=\"_blank\">filtering syntax</a>"},{"displayName":"Metadata Keys","name":"metadataKeys","type":"string","default":"source,page","validateType":"string","description":"Select the metadata to retrieve along the content"},{"displayName":"Hybrid: Query Text","name":"hybridQuery","type":"string","default":"","validateType":"string","description":"Provide a query text to combine vector search with a keyword/text search"},{"displayName":"Hybrid: Explain Score","name":"hybridExplainScore","type":"boolean","default":false,"validateType":"boolean","description":"Whether to show the score fused between hybrid and vector search explanation"},{"displayName":"Hybrid: Fusion Type","name":"fusionType","type":"options","options":[{"name":"Relative Score","value":"RelativeScore"},{"name":"Ranked","value":"Ranked"}],"default":"RelativeScore","description":"Select the fusion type for combining vector and keyword search results"},{"displayName":"Hybrid: Auto Cut Limit","name":"autoCutLimit","type":"number","validateType":"number","description":"Limit result groups by detecting sudden jumps in score"},{"displayName":"Hybrid: Alpha","name":"alpha","type":"number","default":0.5,"validateType":"number","description":"Change the relative weights of the keyword and vector components. 1.0 = pure vector, 0.0 = pure keyword."},{"displayName":"Hybrid: Query Properties","name":"queryProperties","type":"string","default":"","validateType":"string","description":"Comma-separated list of properties to include in the query with optionally weighted values, e.g., \"question^2,answer\""},{"displayName":"Hybrid: Max Vector Distance","name":"maxVectorDistance","type":"number","validateType":"number","description":"Set the maximum allowable distance for the vector search component"},{"displayName":"Tenant Name","name":"tenant","type":"string","default":"","validateType":"string","description":"Tenant Name. Collection must have been created with tenant support enabled."},{"displayName":"Text Key","name":"textKey","type":"string","default":"text","validateType":"string","description":"The key in the document that contains the embedded text"},{"displayName":"Skip Init Checks","name":"skip_init_checks","type":"boolean","default":false,"validateType":"boolean","description":"Whether to skip init checks while instantiating the client"},{"displayName":"Init Timeout","name":"timeout_init","type":"number","default":2,"validateType":"number","description":"Number of timeout seconds for initial checks"},{"displayName":"Insert Timeout","name":"timeout_insert","type":"number","default":90,"validateType":"number","description":"Number of timeout seconds for inserts"},{"displayName":"Query Timeout","name":"timeout_query","type":"number","default":30,"validateType":"number","description":"Number of timeout seconds for queries"},{"displayName":"GRPC Proxy","name":"proxy_grpc","type":"string","default":"","validateType":"string","description":"Proxy to use for GRPC"}],"displayOptions":{"show":{"mode":["load","retrieve-as-tool"]}}},{"displayName":"Options","name":"options","type":"collection","placeholder":"Add Option","default":{},"options":[{"displayName":"Search Filters","name":"searchFilterJson","type":"json","typeOptions":{"rows":5},"default":"{\n \"OR\": [\n {\n \"path\": [\"pdf_info_Author\"],\n \"operator\": \"Equal\",\n \"valueString\": \"Elis\"\n },\n {\n \"path\": [\"pdf_info_Author\"],\n \"operator\": \"Equal\",\n \"valueString\": \"Pinnacle\"\n } \n ]\n}","validateType":"object","description":"Filter pageContent or metadata using this <a href=\"https://weaviate.io/\" target=\"_blank\">filtering syntax</a>"},{"displayName":"Metadata Keys","name":"metadataKeys","type":"string","default":"source,page","validateType":"string","description":"Select the metadata to retrieve along the content"},{"displayName":"Hybrid: Query Text","name":"hybridQuery","type":"string","default":"","validateType":"string","description":"Provide a query text to combine vector search with a keyword/text search"},{"displayName":"Hybrid: Explain Score","name":"hybridExplainScore","type":"boolean","default":false,"validateType":"boolean","description":"Whether to show the score fused between hybrid and vector search explanation"},{"displayName":"Hybrid: Fusion Type","name":"fusionType","type":"options","options":[{"name":"Relative Score","value":"RelativeScore"},{"name":"Ranked","value":"Ranked"}],"default":"RelativeScore","description":"Select the fusion type for combining vector and keyword search results"},{"displayName":"Hybrid: Auto Cut Limit","name":"autoCutLimit","type":"number","validateType":"number","description":"Limit result groups by detecting sudden jumps in score"},{"displayName":"Hybrid: Alpha","name":"alpha","type":"number","default":0.5,"validateType":"number","description":"Change the relative weights of the keyword and vector components. 1.0 = pure vector, 0.0 = pure keyword."},{"displayName":"Hybrid: Query Properties","name":"queryProperties","type":"string","default":"","validateType":"string","description":"Comma-separated list of properties to include in the query with optionally weighted values, e.g., \"question^2,answer\""},{"displayName":"Hybrid: Max Vector Distance","name":"maxVectorDistance","type":"number","validateType":"number","description":"Set the maximum allowable distance for the vector search component"},{"displayName":"Tenant Name","name":"tenant","type":"string","default":"","validateType":"string","description":"Tenant Name. Collection must have been created with tenant support enabled."},{"displayName":"Text Key","name":"textKey","type":"string","default":"text","validateType":"string","description":"The key in the document that contains the embedded text"},{"displayName":"Skip Init Checks","name":"skip_init_checks","type":"boolean","default":false,"validateType":"boolean","description":"Whether to skip init checks while instantiating the client"},{"displayName":"Init Timeout","name":"timeout_init","type":"number","default":2,"validateType":"number","description":"Number of timeout seconds for initial checks"},{"displayName":"Insert Timeout","name":"timeout_insert","type":"number","default":90,"validateType":"number","description":"Number of timeout seconds for inserts"},{"displayName":"Query Timeout","name":"timeout_query","type":"number","default":30,"validateType":"number","description":"Number of timeout seconds for queries"},{"displayName":"GRPC Proxy","name":"proxy_grpc","type":"string","default":"","validateType":"string","description":"Proxy to use for GRPC"}],"displayOptions":{"show":{"mode":["retrieve"]}}}],"iconUrl":"icons/@n8n/n8n-nodes-langchain/dist/nodes/vector_store/VectorStoreWeaviate/weaviate.svg"},
|
|
108
|
+
{"displayName":"Weaviate Vector Store","name":"vectorStoreWeaviate","description":"Work with your data in a Weaviate Cluster","group":["transform"],"version":[1,1.1,1.2,1.3,1.4],"defaults":{"name":"Weaviate Vector Store"},"codex":{"categories":["AI"],"subcategories":{"AI":["Vector Stores","Tools","Root Nodes"],"Vector Stores":["Other Vector Stores"],"Tools":["Other Tools"]},"resources":{"primaryDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.vectorstoreweaviate/"}]}},"builderHint":{"searchHint":"Pick mode by where data flows: `insert` upserts documents into the store on the main flow; `load` runs a one-shot similarity search on the main flow; `retrieve-as-tool` is the canonical RAG mode — plug into an AI Agent's `subnodes.tools`; `retrieve` exposes the store as a subnode for another node's `subnodes.vectorStore`; `update` updates a single document by ID.","extraTypeDefContent":[{"displayOptions":{"show":{"mode":["insert"]}},"content":"Sits on the main flow — pipe the documents you want to embed into this node. Declare with `vectorStore({...})`. Required subnodes: `embedding` and `documentLoader`. If the goal is letting an LLM query the store, use `mode: 'retrieve-as-tool'` instead.\n<patterns>\n<pattern title=\"insert mode — upsert documents (generic, works for any vectorStore* node)\">\n// Substitute the type literal and provider-specific parameters (e.g. pineconeIndex,\n// qdrantCollection, supabaseTableName) — see the rest of this file for the exact shape.\nconst store = vectorStore({\n type: '@n8n/n8n-nodes-langchain.vectorStoreXxx',\n config: {\n name: 'Knowledge Base',\n parameters: {\n mode: 'insert',\n // ...provider-specific parameters\n },\n subnodes: { embedding: embeddingsOpenAi, documentLoader: defaultDataLoader }\n }\n});\n</pattern>\n</patterns>"},{"displayOptions":{"show":{"mode":["retrieve-as-tool"]}},"content":"Canonical RAG mode — declare with the `tool({...})` factory (NOT `vectorStore`) and plug into an AI Agent's `subnodes.tools`. Required subnodes: `embedding`. Set `toolDescription` so the agent knows when to call it.\n<patterns>\n<pattern title=\"retrieve-as-tool mode — RAG via AI Agent (generic, works for any vectorStore* node)\">\n// Substitute the type literal and provider-specific parameters — see the rest of this file\n// for the exact shape (e.g. pineconeIndex, qdrantCollection, supabaseTableName).\nconst knowledgeBase = tool({\n type: '@n8n/n8n-nodes-langchain.vectorStoreXxx',\n config: {\n name: 'Knowledge Base',\n parameters: {\n mode: 'retrieve-as-tool',\n toolDescription: 'Search the product knowledge base',\n // ...provider-specific parameters\n },\n subnodes: { embedding: embeddingsOpenAi }\n }\n});\n\nconst agent = node({\n type: '@n8n/n8n-nodes-langchain.agent',\n config: {\n name: 'Support Agent',\n parameters: { promptType: 'define', text: expr('{{ $json.question }}') },\n subnodes: { model: openAiModel, tools: [knowledgeBase] }\n }\n});\n</pattern>\n</patterns>"},{"displayOptions":{"show":{"mode":["load"]}},"content":"One-shot similarity search on the main flow using the `prompt` parameter. Declare with `vectorStore({...})`. Required subnodes: `embedding`. For LLM-driven querying (RAG), use `mode: 'retrieve-as-tool'` instead.\n<patterns>\n<pattern title=\"load mode — one-shot similarity search (generic)\">\n// Substitute the type literal and provider-specific parameters — see the rest of this file.\nconst lookup = vectorStore({\n type: '@n8n/n8n-nodes-langchain.vectorStoreXxx',\n config: {\n name: 'Knowledge Base',\n parameters: {\n mode: 'load',\n prompt: expr('{{ $json.query }}'),\n // ...provider-specific parameters\n },\n subnodes: { embedding: embeddingsOpenAi }\n }\n});\n</pattern>\n</patterns>"},{"displayOptions":{"show":{"mode":["retrieve"]}},"content":"Exposes the store as an `ai_vectorStore` subnode for another node (e.g. `toolVectorStore`). Declare with `vectorStore({...})`. Required subnodes: `embedding`. For RAG with an AI Agent directly, prefer `mode: 'retrieve-as-tool'`.\n<patterns>\n<pattern title=\"retrieve mode — feed another node as a subnode (generic)\">\n// Substitute the type literal and provider-specific parameters — see the rest of this file.\nconst store = vectorStore({\n type: '@n8n/n8n-nodes-langchain.vectorStoreXxx',\n config: {\n name: 'Knowledge Base',\n parameters: { mode: 'retrieve' /* + provider-specific parameters */ },\n subnodes: { embedding: embeddingsOpenAi }\n }\n});\n\nconst retrieverTool = tool({\n type: '@n8n/n8n-nodes-langchain.toolVectorStore',\n config: {\n name: 'KB Retriever',\n parameters: { description: 'Search the product knowledge base' },\n subnodes: { vectorStore: store, model: openAiModel }\n }\n});\n</pattern>\n</patterns>"},{"displayOptions":{"show":{"mode":["update"]}},"content":"Updates a single document by `id`. Declare with `vectorStore({...})`. Required subnodes: `embedding`. Only available on stores whose `operationModes` enables it — most providers omit this mode.\n<patterns>\n<pattern title=\"update mode — update document by ID (generic)\">\n// Substitute the type literal and provider-specific parameters — see the rest of this file.\nconst store = vectorStore({\n type: '@n8n/n8n-nodes-langchain.vectorStoreXxx',\n config: {\n name: 'Knowledge Base',\n parameters: { mode: 'update', id: expr('{{ $json.docId }}') },\n subnodes: { embedding: embeddingsOpenAi }\n }\n});\n</pattern>\n</patterns>"}],"inputs":{"ai_embedding":{"required":true},"ai_document":{"required":true,"displayOptions":{"show":{"mode":["insert"]}}},"ai_reranker":{"required":true,"displayOptions":{"show":{"mode":["load","retrieve","retrieve-as-tool"],"useReranker":[true]}}}},"outputs":{"main":{"displayOptions":{"show":{"mode":["insert","load","update"]}}},"ai_vectorStore":{"required":true,"displayOptions":{"show":{"mode":["retrieve"]}}},"ai_tool":{"required":true,"displayOptions":{"show":{"mode":["retrieve-as-tool"]}}}}},"credentials":[{"name":"weaviateApi","required":true}],"inputs":"={{\n\t\t\t((parameters) => {\n\t\t\t\tconst mode = parameters?.mode;\n\t\t\t\tconst useReranker = parameters?.useReranker;\n\t\t\t\tconst inputs = [{ displayName: \"Embedding\", type: \"ai_embedding\", required: true, maxConnections: 1}]\n\n\t\t\t\tif (['load', 'retrieve', 'retrieve-as-tool'].includes(mode) && useReranker) {\n\t\t\t\t\tinputs.push({ displayName: \"Reranker\", type: \"ai_reranker\", required: true, maxConnections: 1})\n\t\t\t\t}\n\n\t\t\t\tif (mode === 'retrieve-as-tool') {\n\t\t\t\t\treturn inputs;\n\t\t\t\t}\n\n\t\t\t\tif (['insert', 'load', 'update'].includes(mode)) {\n\t\t\t\t\tinputs.push({ displayName: \"\", type: \"main\"})\n\t\t\t\t}\n\n\t\t\t\tif (['insert'].includes(mode)) {\n\t\t\t\t\tinputs.push({ displayName: \"Document\", type: \"ai_document\", required: true, maxConnections: 1})\n\t\t\t\t}\n\t\t\t\treturn inputs\n\t\t\t})($parameter)\n\t\t}}","outputs":"={{\n\t\t\t((parameters) => {\n\t\t\t\tconst mode = parameters?.mode ?? 'retrieve';\n\n\t\t\t\tif (mode === 'retrieve-as-tool') {\n\t\t\t\t\treturn [{ displayName: \"Tool\", type: \"ai_tool\"}]\n\t\t\t\t}\n\n\t\t\t\tif (mode === 'retrieve') {\n\t\t\t\t\treturn [{ displayName: \"Vector Store\", type: \"ai_vectorStore\"}]\n\t\t\t\t}\n\t\t\t\treturn [{ displayName: \"\", type: \"main\"}]\n\t\t\t})($parameter)\n\t\t}}","properties":[{"displayName":"Tip: Get a feel for vector stores in n8n with our","name":"ragStarterCallout","type":"callout","typeOptions":{"calloutAction":{"label":"RAG starter template","type":"openSampleWorkflowTemplate","templateId":"rag-starter-template"}},"default":""},{"displayName":"Operation Mode","name":"mode","type":"options","noDataExpression":true,"default":"retrieve","options":[{"name":"Get Many","value":"load","description":"Get many ranked documents from vector store for query","action":"Get ranked documents from vector store"},{"name":"Insert Documents","value":"insert","description":"Insert documents into vector store","action":"Add documents to vector store"},{"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 Chain/Tool as Vector Store","outputConnectionType":"ai_vectorStore"},{"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 Agent as Tool","outputConnectionType":"ai_tool"}]},{"displayName":"This node must be connected to a vector store retriever. <a data-action='openSelectiveNodeCreator' data-action-parameter-connectiontype='ai_retriever'>Insert one</a>","name":"notice","type":"notice","default":"","typeOptions":{"containerClass":"ndv-connection-hint-notice"},"displayOptions":{"show":{"mode":["retrieve"]}}},{"displayName":"Name","name":"toolName","type":"string","default":"","required":true,"description":"Name of the vector store","placeholder":"e.g. company_knowledge_base","validateType":"string-alphanumeric","displayOptions":{"show":{"@version":[{"_cnd":{"lte":1.2}}],"mode":["retrieve-as-tool"]}}},{"displayName":"Description","name":"toolDescription","type":"string","default":"","required":true,"typeOptions":{"rows":2},"description":"Explain to the LLM what this tool does, a good, specific description would allow LLMs to produce expected results much more often","placeholder":"e.g. Work with your data in a Weaviate Cluster","displayOptions":{"show":{"mode":["retrieve-as-tool"]}}},{"displayName":"Weaviate Collection","name":"weaviateCollection","type":"resourceLocator","default":{"mode":"list","value":""},"required":true,"modes":[{"displayName":"From List","name":"list","type":"list","typeOptions":{"searchListMethod":"weaviateCollectionsSearch"}},{"displayName":"ID","name":"id","type":"string"}]},{"displayName":"Embedding Batch Size","name":"embeddingBatchSize","type":"number","default":200,"description":"Number of documents to embed in a single batch","displayOptions":{"show":{"mode":["insert"],"@version":[{"_cnd":{"gte":1.1}}]}}},{"displayName":"Options","name":"options","type":"collection","placeholder":"Add Option","default":{},"options":[{"displayName":"Tenant Name","name":"tenant","type":"string","default":"","validateType":"string","description":"Tenant Name. Collection must have been created with tenant support enabled."},{"displayName":"Text Key","name":"textKey","type":"string","default":"text","validateType":"string","description":"The key in the document that contains the embedded text"},{"displayName":"Skip Init Checks","name":"skip_init_checks","type":"boolean","default":false,"validateType":"boolean","description":"Whether to skip init checks while instantiating the client"},{"displayName":"Init Timeout","name":"timeout_init","type":"number","default":2,"validateType":"number","description":"Number of timeout seconds for initial checks"},{"displayName":"Insert Timeout","name":"timeout_insert","type":"number","default":90,"validateType":"number","description":"Number of timeout seconds for inserts"},{"displayName":"Query Timeout","name":"timeout_query","type":"number","default":30,"validateType":"number","description":"Number of timeout seconds for queries"},{"displayName":"GRPC Proxy","name":"proxy_grpc","type":"string","default":"","validateType":"string","description":"Proxy to use for GRPC. Applies only when the credential has no gRPC proxy, and needs \"Custom Connection gRPC Secure\" when the credential has an API key.","hint":"Set the gRPC proxy in the Weaviate credential instead"},{"displayName":"Clear Data","name":"clearStore","type":"boolean","default":false,"description":"Whether to clear the Collection/Tenant before inserting new data"}],"displayOptions":{"show":{"mode":["insert"]}}},{"displayName":"Prompt","name":"prompt","type":"string","default":"","required":true,"description":"Search prompt to retrieve matching documents from the vector store using similarity-based ranking","displayOptions":{"show":{"mode":["load"]}}},{"displayName":"Limit","name":"topK","type":"number","default":4,"description":"Number of top results to fetch from vector store","displayOptions":{"show":{"mode":["load","retrieve-as-tool"]}}},{"displayName":"Include Metadata","name":"includeDocumentMetadata","type":"boolean","default":true,"description":"Whether or not to include document metadata","displayOptions":{"show":{"mode":["load","retrieve-as-tool"]}}},{"displayName":"Rerank Results","name":"useReranker","type":"boolean","default":false,"description":"Whether or not to rerank results","displayOptions":{"show":{"mode":["load","retrieve","retrieve-as-tool"]}}},{"displayName":"ID","name":"id","type":"string","default":"","required":true,"description":"ID of an embedding entry","displayOptions":{"show":{"mode":["update"]}}},{"displayName":"Options","name":"options","type":"collection","placeholder":"Add Option","default":{},"options":[{"displayName":"Search Filters","name":"searchFilterJson","type":"json","typeOptions":{"rows":5},"default":"{\n \"OR\": [\n {\n \"path\": [\"pdf_info_Author\"],\n \"operator\": \"Equal\",\n \"valueString\": \"Elis\"\n },\n {\n \"path\": [\"pdf_info_Author\"],\n \"operator\": \"Equal\",\n \"valueString\": \"Pinnacle\"\n } \n ]\n}","validateType":"object","description":"Filter pageContent or metadata using this <a href=\"https://weaviate.io/\" target=\"_blank\">filtering syntax</a>"},{"displayName":"Metadata Keys","name":"metadataKeys","type":"string","default":"source,page","validateType":"string","description":"Select the metadata to retrieve along the content"},{"displayName":"Hybrid: Query Text","name":"hybridQuery","type":"string","default":"","validateType":"string","description":"Provide a query text to combine vector search with a keyword/text search"},{"displayName":"Hybrid: Explain Score","name":"hybridExplainScore","type":"boolean","default":false,"validateType":"boolean","description":"Whether to show the score fused between hybrid and vector search explanation"},{"displayName":"Hybrid: Fusion Type","name":"fusionType","type":"options","options":[{"name":"Relative Score","value":"RelativeScore"},{"name":"Ranked","value":"Ranked"}],"default":"RelativeScore","description":"Select the fusion type for combining vector and keyword search results"},{"displayName":"Hybrid: Auto Cut Limit","name":"autoCutLimit","type":"number","validateType":"number","description":"Limit result groups by detecting sudden jumps in score"},{"displayName":"Hybrid: Alpha","name":"alpha","type":"number","default":0.5,"validateType":"number","description":"Change the relative weights of the keyword and vector components. 1.0 = pure vector, 0.0 = pure keyword."},{"displayName":"Hybrid: Query Properties","name":"queryProperties","type":"string","default":"","validateType":"string","description":"Comma-separated list of properties to include in the query with optionally weighted values, e.g., \"question^2,answer\""},{"displayName":"Hybrid: Max Vector Distance","name":"maxVectorDistance","type":"number","validateType":"number","description":"Set the maximum allowable distance for the vector search component"},{"displayName":"Tenant Name","name":"tenant","type":"string","default":"","validateType":"string","description":"Tenant Name. Collection must have been created with tenant support enabled."},{"displayName":"Text Key","name":"textKey","type":"string","default":"text","validateType":"string","description":"The key in the document that contains the embedded text"},{"displayName":"Skip Init Checks","name":"skip_init_checks","type":"boolean","default":false,"validateType":"boolean","description":"Whether to skip init checks while instantiating the client"},{"displayName":"Init Timeout","name":"timeout_init","type":"number","default":2,"validateType":"number","description":"Number of timeout seconds for initial checks"},{"displayName":"Insert Timeout","name":"timeout_insert","type":"number","default":90,"validateType":"number","description":"Number of timeout seconds for inserts"},{"displayName":"Query Timeout","name":"timeout_query","type":"number","default":30,"validateType":"number","description":"Number of timeout seconds for queries"},{"displayName":"GRPC Proxy","name":"proxy_grpc","type":"string","default":"","validateType":"string","description":"Proxy to use for GRPC. Applies only when the credential has no gRPC proxy, and needs \"Custom Connection gRPC Secure\" when the credential has an API key.","hint":"Set the gRPC proxy in the Weaviate credential instead"}],"displayOptions":{"show":{"mode":["load","retrieve-as-tool"]}}},{"displayName":"Options","name":"options","type":"collection","placeholder":"Add Option","default":{},"options":[{"displayName":"Search Filters","name":"searchFilterJson","type":"json","typeOptions":{"rows":5},"default":"{\n \"OR\": [\n {\n \"path\": [\"pdf_info_Author\"],\n \"operator\": \"Equal\",\n \"valueString\": \"Elis\"\n },\n {\n \"path\": [\"pdf_info_Author\"],\n \"operator\": \"Equal\",\n \"valueString\": \"Pinnacle\"\n } \n ]\n}","validateType":"object","description":"Filter pageContent or metadata using this <a href=\"https://weaviate.io/\" target=\"_blank\">filtering syntax</a>"},{"displayName":"Metadata Keys","name":"metadataKeys","type":"string","default":"source,page","validateType":"string","description":"Select the metadata to retrieve along the content"},{"displayName":"Hybrid: Query Text","name":"hybridQuery","type":"string","default":"","validateType":"string","description":"Provide a query text to combine vector search with a keyword/text search"},{"displayName":"Hybrid: Explain Score","name":"hybridExplainScore","type":"boolean","default":false,"validateType":"boolean","description":"Whether to show the score fused between hybrid and vector search explanation"},{"displayName":"Hybrid: Fusion Type","name":"fusionType","type":"options","options":[{"name":"Relative Score","value":"RelativeScore"},{"name":"Ranked","value":"Ranked"}],"default":"RelativeScore","description":"Select the fusion type for combining vector and keyword search results"},{"displayName":"Hybrid: Auto Cut Limit","name":"autoCutLimit","type":"number","validateType":"number","description":"Limit result groups by detecting sudden jumps in score"},{"displayName":"Hybrid: Alpha","name":"alpha","type":"number","default":0.5,"validateType":"number","description":"Change the relative weights of the keyword and vector components. 1.0 = pure vector, 0.0 = pure keyword."},{"displayName":"Hybrid: Query Properties","name":"queryProperties","type":"string","default":"","validateType":"string","description":"Comma-separated list of properties to include in the query with optionally weighted values, e.g., \"question^2,answer\""},{"displayName":"Hybrid: Max Vector Distance","name":"maxVectorDistance","type":"number","validateType":"number","description":"Set the maximum allowable distance for the vector search component"},{"displayName":"Tenant Name","name":"tenant","type":"string","default":"","validateType":"string","description":"Tenant Name. Collection must have been created with tenant support enabled."},{"displayName":"Text Key","name":"textKey","type":"string","default":"text","validateType":"string","description":"The key in the document that contains the embedded text"},{"displayName":"Skip Init Checks","name":"skip_init_checks","type":"boolean","default":false,"validateType":"boolean","description":"Whether to skip init checks while instantiating the client"},{"displayName":"Init Timeout","name":"timeout_init","type":"number","default":2,"validateType":"number","description":"Number of timeout seconds for initial checks"},{"displayName":"Insert Timeout","name":"timeout_insert","type":"number","default":90,"validateType":"number","description":"Number of timeout seconds for inserts"},{"displayName":"Query Timeout","name":"timeout_query","type":"number","default":30,"validateType":"number","description":"Number of timeout seconds for queries"},{"displayName":"GRPC Proxy","name":"proxy_grpc","type":"string","default":"","validateType":"string","description":"Proxy to use for GRPC. Applies only when the credential has no gRPC proxy, and needs \"Custom Connection gRPC Secure\" when the credential has an API key.","hint":"Set the gRPC proxy in the Weaviate credential instead"}],"displayOptions":{"show":{"mode":["retrieve"]}}}],"iconUrl":"icons/@n8n/n8n-nodes-langchain/dist/nodes/vector_store/VectorStoreWeaviate/weaviate.svg"},
|
|
109
109
|
{"displayName":"Chroma Vector Store","name":"vectorStoreChromaDB","description":"Work with your data in Chroma Vector Store","group":["transform"],"version":[1,1.1,1.2,1.3,1.4],"defaults":{"name":"Chroma Vector Store"},"codex":{"categories":["AI"],"subcategories":{"AI":["Vector Stores","Tools","Root Nodes"],"Vector Stores":["Other Vector Stores"],"Tools":["Other Tools"]},"resources":{"primaryDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.vectorstorechromadb/"}]}},"builderHint":{"searchHint":"Pick mode by where data flows: `insert` upserts documents into the store on the main flow; `load` runs a one-shot similarity search on the main flow; `retrieve-as-tool` is the canonical RAG mode — plug into an AI Agent's `subnodes.tools`; `retrieve` exposes the store as a subnode for another node's `subnodes.vectorStore`; `update` updates a single document by ID.","extraTypeDefContent":[{"displayOptions":{"show":{"mode":["insert"]}},"content":"Sits on the main flow — pipe the documents you want to embed into this node. Declare with `vectorStore({...})`. Required subnodes: `embedding` and `documentLoader`. If the goal is letting an LLM query the store, use `mode: 'retrieve-as-tool'` instead.\n<patterns>\n<pattern title=\"insert mode — upsert documents (generic, works for any vectorStore* node)\">\n// Substitute the type literal and provider-specific parameters (e.g. pineconeIndex,\n// qdrantCollection, supabaseTableName) — see the rest of this file for the exact shape.\nconst store = vectorStore({\n type: '@n8n/n8n-nodes-langchain.vectorStoreXxx',\n config: {\n name: 'Knowledge Base',\n parameters: {\n mode: 'insert',\n // ...provider-specific parameters\n },\n subnodes: { embedding: embeddingsOpenAi, documentLoader: defaultDataLoader }\n }\n});\n</pattern>\n</patterns>"},{"displayOptions":{"show":{"mode":["retrieve-as-tool"]}},"content":"Canonical RAG mode — declare with the `tool({...})` factory (NOT `vectorStore`) and plug into an AI Agent's `subnodes.tools`. Required subnodes: `embedding`. Set `toolDescription` so the agent knows when to call it.\n<patterns>\n<pattern title=\"retrieve-as-tool mode — RAG via AI Agent (generic, works for any vectorStore* node)\">\n// Substitute the type literal and provider-specific parameters — see the rest of this file\n// for the exact shape (e.g. pineconeIndex, qdrantCollection, supabaseTableName).\nconst knowledgeBase = tool({\n type: '@n8n/n8n-nodes-langchain.vectorStoreXxx',\n config: {\n name: 'Knowledge Base',\n parameters: {\n mode: 'retrieve-as-tool',\n toolDescription: 'Search the product knowledge base',\n // ...provider-specific parameters\n },\n subnodes: { embedding: embeddingsOpenAi }\n }\n});\n\nconst agent = node({\n type: '@n8n/n8n-nodes-langchain.agent',\n config: {\n name: 'Support Agent',\n parameters: { promptType: 'define', text: expr('{{ $json.question }}') },\n subnodes: { model: openAiModel, tools: [knowledgeBase] }\n }\n});\n</pattern>\n</patterns>"},{"displayOptions":{"show":{"mode":["load"]}},"content":"One-shot similarity search on the main flow using the `prompt` parameter. Declare with `vectorStore({...})`. Required subnodes: `embedding`. For LLM-driven querying (RAG), use `mode: 'retrieve-as-tool'` instead.\n<patterns>\n<pattern title=\"load mode — one-shot similarity search (generic)\">\n// Substitute the type literal and provider-specific parameters — see the rest of this file.\nconst lookup = vectorStore({\n type: '@n8n/n8n-nodes-langchain.vectorStoreXxx',\n config: {\n name: 'Knowledge Base',\n parameters: {\n mode: 'load',\n prompt: expr('{{ $json.query }}'),\n // ...provider-specific parameters\n },\n subnodes: { embedding: embeddingsOpenAi }\n }\n});\n</pattern>\n</patterns>"},{"displayOptions":{"show":{"mode":["retrieve"]}},"content":"Exposes the store as an `ai_vectorStore` subnode for another node (e.g. `toolVectorStore`). Declare with `vectorStore({...})`. Required subnodes: `embedding`. For RAG with an AI Agent directly, prefer `mode: 'retrieve-as-tool'`.\n<patterns>\n<pattern title=\"retrieve mode — feed another node as a subnode (generic)\">\n// Substitute the type literal and provider-specific parameters — see the rest of this file.\nconst store = vectorStore({\n type: '@n8n/n8n-nodes-langchain.vectorStoreXxx',\n config: {\n name: 'Knowledge Base',\n parameters: { mode: 'retrieve' /* + provider-specific parameters */ },\n subnodes: { embedding: embeddingsOpenAi }\n }\n});\n\nconst retrieverTool = tool({\n type: '@n8n/n8n-nodes-langchain.toolVectorStore',\n config: {\n name: 'KB Retriever',\n parameters: { description: 'Search the product knowledge base' },\n subnodes: { vectorStore: store, model: openAiModel }\n }\n});\n</pattern>\n</patterns>"},{"displayOptions":{"show":{"mode":["update"]}},"content":"Updates a single document by `id`. Declare with `vectorStore({...})`. Required subnodes: `embedding`. Only available on stores whose `operationModes` enables it — most providers omit this mode.\n<patterns>\n<pattern title=\"update mode — update document by ID (generic)\">\n// Substitute the type literal and provider-specific parameters — see the rest of this file.\nconst store = vectorStore({\n type: '@n8n/n8n-nodes-langchain.vectorStoreXxx',\n config: {\n name: 'Knowledge Base',\n parameters: { mode: 'update', id: expr('{{ $json.docId }}') },\n subnodes: { embedding: embeddingsOpenAi }\n }\n});\n</pattern>\n</patterns>"}],"inputs":{"ai_embedding":{"required":true},"ai_document":{"required":true,"displayOptions":{"show":{"mode":["insert"]}}},"ai_reranker":{"required":true,"displayOptions":{"show":{"mode":["load","retrieve","retrieve-as-tool"],"useReranker":[true]}}}},"outputs":{"main":{"displayOptions":{"show":{"mode":["insert","load","update"]}}},"ai_vectorStore":{"required":true,"displayOptions":{"show":{"mode":["retrieve"]}}},"ai_tool":{"required":true,"displayOptions":{"show":{"mode":["retrieve-as-tool"]}}}}},"credentials":[{"name":"chromaSelfHostedApi","required":true,"displayOptions":{"show":{"authentication":["chromaSelfHostedApi"]}}},{"name":"chromaCloudApi","required":true,"displayOptions":{"show":{"authentication":["chromaCloudApi"]}}}],"inputs":"={{\n\t\t\t((parameters) => {\n\t\t\t\tconst mode = parameters?.mode;\n\t\t\t\tconst useReranker = parameters?.useReranker;\n\t\t\t\tconst inputs = [{ displayName: \"Embedding\", type: \"ai_embedding\", required: true, maxConnections: 1}]\n\n\t\t\t\tif (['load', 'retrieve', 'retrieve-as-tool'].includes(mode) && useReranker) {\n\t\t\t\t\tinputs.push({ displayName: \"Reranker\", type: \"ai_reranker\", required: true, maxConnections: 1})\n\t\t\t\t}\n\n\t\t\t\tif (mode === 'retrieve-as-tool') {\n\t\t\t\t\treturn inputs;\n\t\t\t\t}\n\n\t\t\t\tif (['insert', 'load', 'update'].includes(mode)) {\n\t\t\t\t\tinputs.push({ displayName: \"\", type: \"main\"})\n\t\t\t\t}\n\n\t\t\t\tif (['insert'].includes(mode)) {\n\t\t\t\t\tinputs.push({ displayName: \"Document\", type: \"ai_document\", required: true, maxConnections: 1})\n\t\t\t\t}\n\t\t\t\treturn inputs\n\t\t\t})($parameter)\n\t\t}}","outputs":"={{\n\t\t\t((parameters) => {\n\t\t\t\tconst mode = parameters?.mode ?? 'retrieve';\n\n\t\t\t\tif (mode === 'retrieve-as-tool') {\n\t\t\t\t\treturn [{ displayName: \"Tool\", type: \"ai_tool\"}]\n\t\t\t\t}\n\n\t\t\t\tif (mode === 'retrieve') {\n\t\t\t\t\treturn [{ displayName: \"Vector Store\", type: \"ai_vectorStore\"}]\n\t\t\t\t}\n\t\t\t\treturn [{ displayName: \"\", type: \"main\"}]\n\t\t\t})($parameter)\n\t\t}}","properties":[{"displayName":"Tip: Get a feel for vector stores in n8n with our","name":"ragStarterCallout","type":"callout","typeOptions":{"calloutAction":{"label":"RAG starter template","type":"openSampleWorkflowTemplate","templateId":"rag-starter-template"}},"default":""},{"displayName":"Operation Mode","name":"mode","type":"options","noDataExpression":true,"default":"retrieve","options":[{"name":"Get Many","value":"load","description":"Get many ranked documents from vector store for query","action":"Get ranked documents from vector store"},{"name":"Insert Documents","value":"insert","description":"Insert documents into vector store","action":"Add documents to vector store"},{"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 Chain/Tool as Vector Store","outputConnectionType":"ai_vectorStore"},{"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 Agent as Tool","outputConnectionType":"ai_tool"}]},{"displayName":"This node must be connected to a vector store retriever. <a data-action='openSelectiveNodeCreator' data-action-parameter-connectiontype='ai_retriever'>Insert one</a>","name":"notice","type":"notice","default":"","typeOptions":{"containerClass":"ndv-connection-hint-notice"},"displayOptions":{"show":{"mode":["retrieve"]}}},{"displayName":"Name","name":"toolName","type":"string","default":"","required":true,"description":"Name of the vector store","placeholder":"e.g. company_knowledge_base","validateType":"string-alphanumeric","displayOptions":{"show":{"@version":[{"_cnd":{"lte":1.2}}],"mode":["retrieve-as-tool"]}}},{"displayName":"Description","name":"toolDescription","type":"string","default":"","required":true,"typeOptions":{"rows":2},"description":"Explain to the LLM what this tool does, a good, specific description would allow LLMs to produce expected results much more often","placeholder":"e.g. Work with your data in Chroma Vector Store","displayOptions":{"show":{"mode":["retrieve-as-tool"]}}},{"displayName":"Authentication","name":"authentication","type":"options","options":[{"name":"Self-Hosted","value":"chromaSelfHostedApi","description":"Connect to a self-hosted ChromaDB instance"},{"name":"Cloud","value":"chromaCloudApi","description":"Connect to Chroma Cloud"}],"default":"chromaSelfHostedApi"},{"displayName":"Chroma Collection","name":"chromaCollection","type":"resourceLocator","default":{"mode":"list","value":""},"required":true,"modes":[{"displayName":"From List","name":"list","type":"list","typeOptions":{"searchListMethod":"chromaCollectionsSearch"}},{"displayName":"ID","name":"id","type":"string"}]},{"displayName":"Embedding Batch Size","name":"embeddingBatchSize","type":"number","default":200,"description":"Number of documents to embed in a single batch","displayOptions":{"show":{"mode":["insert"],"@version":[{"_cnd":{"gte":1.1}}]}}},{"displayName":"Options","name":"options","type":"collection","placeholder":"Add Option","default":{},"options":[{"displayName":"Clear Collection","name":"clearCollection","type":"boolean","default":false,"description":"Whether to clear the collection before inserting new data"}],"displayOptions":{"show":{"mode":["insert"]}}},{"displayName":"Prompt","name":"prompt","type":"string","default":"","required":true,"description":"Search prompt to retrieve matching documents from the vector store using similarity-based ranking","displayOptions":{"show":{"mode":["load"]}}},{"displayName":"Limit","name":"topK","type":"number","default":4,"description":"Number of top results to fetch from vector store","displayOptions":{"show":{"mode":["load","retrieve-as-tool"]}}},{"displayName":"Include Metadata","name":"includeDocumentMetadata","type":"boolean","default":true,"description":"Whether or not to include document metadata","displayOptions":{"show":{"mode":["load","retrieve-as-tool"]}}},{"displayName":"Rerank Results","name":"useReranker","type":"boolean","default":false,"description":"Whether or not to rerank results","displayOptions":{"show":{"mode":["load","retrieve","retrieve-as-tool"]}}},{"displayName":"ID","name":"id","type":"string","default":"","required":true,"description":"ID of an embedding entry","displayOptions":{"show":{"mode":["update"]}}},{"displayName":"Options","name":"options","type":"collection","placeholder":"Add Option","default":{},"options":[{"displayName":"Metadata Filter","name":"metadata","type":"fixedCollection","description":"Metadata to filter the document by","typeOptions":{"multipleValues":true},"default":{},"placeholder":"Add filter field","options":[{"name":"metadataValues","displayName":"Fields to Set","values":[{"displayName":"Name","name":"name","type":"string","default":"","required":true},{"displayName":"Value","name":"value","type":"string","default":""}]}]}],"displayOptions":{"show":{"mode":["load","retrieve-as-tool"]}}},{"displayName":"Options","name":"options","type":"collection","placeholder":"Add Option","default":{},"options":[{"displayName":"Metadata Filter","name":"metadata","type":"fixedCollection","description":"Metadata to filter the document by","typeOptions":{"multipleValues":true},"default":{},"placeholder":"Add filter field","options":[{"name":"metadataValues","displayName":"Fields to Set","values":[{"displayName":"Name","name":"name","type":"string","default":"","required":true},{"displayName":"Value","name":"value","type":"string","default":""}]}]}],"displayOptions":{"show":{"mode":["retrieve"]}}}],"iconUrl":{"light":"icons/@n8n/n8n-nodes-langchain/dist/nodes/vector_store/VectorStoreChromaDB/chroma.svg","dark":"icons/@n8n/n8n-nodes-langchain/dist/nodes/vector_store/VectorStoreChromaDB/chroma.svg"}},
|
|
110
110
|
{"displayName":"Tool Executor","name":"toolExecutor","version":1,"defaults":{"name":"Tool Executor"},"hidden":true,"inputs":["main","ai_tool"],"outputs":["main"],"builderHint":{"inputs":{"ai_tool":{"required":true}}},"properties":[{"displayName":"Query","name":"query","type":"json","default":"{}","description":"Key-value pairs, where key is the name of the tool name and value is the parameters to pass to the tool"},{"displayName":"Tool Name","name":"toolName","type":"string","default":"","description":"Name of the tool to execute if the connected tool is a toolkit"},{"displayName":"Node","name":"node","type":"string","default":"","description":"Name of the node that is being executed"}],"group":["transform"],"description":"Node to execute tools without an AI Agent","codex":{"categories":["Core Nodes"],"subcategories":{"Core Nodes":["Helpers"]},"resources":{"primaryDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.editimage/"}]}}},
|
|
111
111
|
{"displayName":"Model Selector","name":"modelSelector","icon":"node:model-selector","iconColor":"black","defaults":{"name":"Model Selector"},"version":1,"group":["transform"],"description":"Use this node to select one of the connected models to this node based on workflow data","inputs":"={{\n\t\t\t\t((parameters) => {\n\t\t\t\t\tfunction configuredInputs(parameters) {\n return Array.from({ length: parameters.numberInputs || 2 }, (_, i) => ({\n type: 'ai_languageModel',\n displayName: `Model ${(i + 1).toString()}`,\n required: true,\n maxConnections: 1,\n }));\n};\n\t\t\t\t\treturn configuredInputs(parameters)\n\t\t\t\t})($parameter)\n\t\t\t}}","codex":{"categories":["AI"],"subcategories":{"AI":["Language Models"]},"resources":{"primaryDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.modelselector/"}]}},"outputs":["ai_languageModel"],"requiredInputs":1,"properties":[{"displayName":"Number of Inputs","name":"numberInputs","type":"options","noDataExpression":true,"default":2,"options":[{"name":"2","value":2},{"name":"3","value":3},{"name":"4","value":4},{"name":"5","value":5},{"name":"6","value":6},{"name":"7","value":7},{"name":"8","value":8},{"name":"9","value":9},{"name":"10","value":10}],"validateType":"number","description":"The number of data inputs you want to merge. The node waits for all connected inputs to be executed."},{"displayName":"Rules","name":"rules","placeholder":"Add Rule","type":"fixedCollection","typeOptions":{"multipleValues":true,"sortable":true},"description":"Rules to map workflow data to specific models","default":{},"options":[{"displayName":"Rule","name":"rule","values":[{"displayName":"Model","name":"modelIndex","type":"options","description":"Choose model input from the list","default":1,"required":true,"placeholder":"Choose model input from the list","typeOptions":{"loadOptionsMethod":"getModels"}},{"displayName":"Conditions","name":"conditions","placeholder":"Add Condition","type":"filter","default":{},"typeOptions":{"filter":{"caseSensitive":true,"typeValidation":"strict","version":2}},"description":"Conditions that must be met to select this model"}]}]}]},
|
|
@@ -137,7 +137,19 @@ function createEngineRequests(toolCalls, itemIndex, tools) {
|
|
|
137
137
|
const hitlMetadata = extractHitlMetadata(metadata, toolCall.tool, toolInput);
|
|
138
138
|
let input = toolInput;
|
|
139
139
|
if (metadata.isFromToolkit) {
|
|
140
|
-
input = { ...input
|
|
140
|
+
input = { ...input };
|
|
141
|
+
delete input[types_1.INTERNAL_TOOL_ARG_STASH_KEY];
|
|
142
|
+
if (metadata.isMcpTool) {
|
|
143
|
+
const stashedArguments = {};
|
|
144
|
+
if ('tool' in input)
|
|
145
|
+
stashedArguments.tool = input.tool;
|
|
146
|
+
if ('toolCallId' in input)
|
|
147
|
+
stashedArguments.toolCallId = input.toolCallId;
|
|
148
|
+
if (Object.keys(stashedArguments).length > 0) {
|
|
149
|
+
input[types_1.INTERNAL_TOOL_ARG_STASH_KEY] = stashedArguments;
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
input.tool = toolCall.tool;
|
|
141
153
|
}
|
|
142
154
|
if (hitlMetadata) {
|
|
143
155
|
input = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createEngineRequests.js","sourceRoot":"","sources":["../../../utils/agent-execution/createEngineRequests.ts"],"names":[],"mappings":";;;;;;;;AACA,+DAAuC;AACvC,uDAA+B;AAE/B,+CAAmD;AASnD,
|
|
1
|
+
{"version":3,"file":"createEngineRequests.js","sourceRoot":"","sources":["../../../utils/agent-execution/createEngineRequests.ts"],"names":[],"mappings":";;;;;;;;AACA,+DAAuC;AACvC,uDAA+B;AAE/B,+CAAmD;AASnD,mCAKiB;AAEjB,8BACC,QAAiB;IAEjB,OAAO,CACN,IAAA,kBAAQ,EAAC,QAAQ,CAAC;QAClB,OAAQ,QAAoC,CAAC,iBAAiB,KAAK,QAAQ,CAC3E,CAAC;AACH,CAAC;AAED,6BACC,QAAsB,EACtB,QAAgB,EAChB,SAAsB;IAEtB,IAAI,CAAC,oBAAoB,CAAC,QAAQ,CAAC;QAAE,OAAO,SAAS,CAAC;IAEtD,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EAAC,KAAK,EAAE,gBAAgB,CAAC;gBAChC,GAAI,KAAK,CAAC,cAA8B;gBACxC,cAAc,EAAE,KAAK,CAAC,cAAc;aACpC,CAAC;QACH,CAAC;QAED,OAAO;YACN,UAAU,EAAE,qBAA8B;YAC1C,QAAQ;YACR,KAAK;YACL,IAAI,EAAE,kCAAmB,CAAC,MAAM;YAChC,EAAE,EAAE,QAAQ,CAAC,UAAU;YACvB,QAAQ,EAAE;gBACT,SAAS;gBACT,IAAI,EAAE,YAAY;gBAClB,QAAQ,EAAE,QAAQ,CAAC,IAAI;gBACvB,GAAG,uBAAuB,CAAC,QAAQ,EAAE,gBAAgB,EAAE,sBAAsB,CAAC;aAC9E;SACD,CAAC;IACH,CAAC,CAAC;SACD,MAAM,CAAC,CAAC,IAAI,EAAoC,EAAE,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC;AAC1E,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { DynamicStructuredTool, Tool } from '@langchain/classic/tools';
|
|
2
2
|
import type { EngineRequest, ExecuteNodeResult, INode } from 'n8n-workflow';
|
|
3
|
-
import type
|
|
3
|
+
import { type RequestResponseMetadata } from './types';
|
|
4
4
|
type ConnectedTool = DynamicStructuredTool | Tool;
|
|
5
5
|
type Action = EngineRequest<RequestResponseMetadata>['actions'][number];
|
|
6
6
|
export declare function executeEngineAction(node: INode, action: Action, tools: ConnectedTool[]): Promise<ExecuteNodeResult<RequestResponseMetadata>>;
|
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.executeEngineAction = executeEngineAction;
|
|
7
7
|
const omit_1 = __importDefault(require("lodash/omit"));
|
|
8
8
|
const n8n_workflow_1 = require("n8n-workflow");
|
|
9
|
+
const types_1 = require("./types");
|
|
9
10
|
const EMPTY_TASK_DATA_SHELL = { executionTime: 0, startTime: 0, executionIndex: 0, source: [] };
|
|
10
11
|
async function executeEngineAction(node, action, tools) {
|
|
11
12
|
const tool = tools.find((t) => t.name === action.metadata?.toolName);
|
|
@@ -13,7 +14,15 @@ async function executeEngineAction(node, action, tools) {
|
|
|
13
14
|
return errorResult(node, action, `Sub-agent could not find a connected tool for node "${action.nodeName}".`);
|
|
14
15
|
}
|
|
15
16
|
try {
|
|
16
|
-
const
|
|
17
|
+
const stashedArguments = action.input[types_1.INTERNAL_TOOL_ARG_STASH_KEY];
|
|
18
|
+
const toolArguments = (0, omit_1.default)(action.input, ['tool', types_1.INTERNAL_TOOL_ARG_STASH_KEY]);
|
|
19
|
+
if (stashedArguments && typeof stashedArguments === 'object') {
|
|
20
|
+
if ('tool' in stashedArguments)
|
|
21
|
+
toolArguments.tool = stashedArguments.tool;
|
|
22
|
+
if ('toolCallId' in stashedArguments)
|
|
23
|
+
toolArguments.toolCallId = stashedArguments.toolCallId;
|
|
24
|
+
}
|
|
25
|
+
const output = await tool.invoke(toolArguments);
|
|
17
26
|
return {
|
|
18
27
|
action,
|
|
19
28
|
data: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"executeEngineAction.js","sourceRoot":"","sources":["../../../utils/agent-execution/executeEngineAction.ts"],"names":[],"mappings":";;;;;;AACA,uDAA+B;AAE/B,+CAAkD;
|
|
1
|
+
{"version":3,"file":"executeEngineAction.js","sourceRoot":"","sources":["../../../utils/agent-execution/executeEngineAction.ts"],"names":[],"mappings":";;;;;;AACA,uDAA+B;AAE/B,+CAAkD;AAElD,mCAAoF;AAKpF,MAAM,qBAAqB,GAGvB,EAAE,aAAa,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,cAAc,EAAE,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC;AAG/D,KAAK,8BACX,IAAW,EACX,MAAc,EACd,KAAsB;IAEtB,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,MAAM,CAAC,QAAQ,EAAE,QAAQ,C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YACxB,eAAe,EAAE,OAAO;YACxB,KAAK,EAAE,IAAI,iCAAkB,CAAC,IAAI,EAAE,OAAO,CAAC;SAC5C;KACD,CAAC;AACH,CAAC"}
|
|
@@ -7,3 +7,4 @@ export { loadMemory, saveToMemory, buildToolContext } from './memoryManagement';
|
|
|
7
7
|
export { processHitlResponses, type HitlProcessingResult } from './processHitlResponses';
|
|
8
8
|
export { serializeIntermediateSteps } from './serializeIntermediateSteps';
|
|
9
9
|
export type { ToolCallRequest, ToolCallData, AgentResult, RequestResponseMetadata, ToolMetadata, ThinkingMetadata, GoogleThinkingMetadata, AnthropicThinkingMetadata, HitlMetadata, } from './types';
|
|
10
|
+
export { INTERNAL_TOOL_ARG_STASH_KEY } from './types';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.serializeIntermediateSteps = exports.processHitlResponses = exports.buildToolContext = exports.saveToMemory = exports.loadMemory = exports.processEventStream = exports.buildSteps = exports.buildResponseMetadata = exports.executeEngineAction = exports.createEngineRequests = void 0;
|
|
3
|
+
exports.INTERNAL_TOOL_ARG_STASH_KEY = exports.serializeIntermediateSteps = exports.processHitlResponses = exports.buildToolContext = exports.saveToMemory = exports.loadMemory = exports.processEventStream = exports.buildSteps = exports.buildResponseMetadata = exports.executeEngineAction = exports.createEngineRequests = void 0;
|
|
4
4
|
var createEngineRequests_1 = require("./createEngineRequests");
|
|
5
5
|
Object.defineProperty(exports, "createEngineRequests", { enumerable: true, get: function () { return createEngineRequests_1.createEngineRequests; } });
|
|
6
6
|
var executeEngineAction_1 = require("./executeEngineAction");
|
|
@@ -19,4 +19,6 @@ var processHitlResponses_1 = require("./processHitlResponses");
|
|
|
19
19
|
Object.defineProperty(exports, "processHitlResponses", { enumerable: true, get: function () { return processHitlResponses_1.processHitlResponses; } });
|
|
20
20
|
var serializeIntermediateSteps_1 = require("./serializeIntermediateSteps");
|
|
21
21
|
Object.defineProperty(exports, "serializeIntermediateSteps", { enumerable: true, get: function () { return serializeIntermediateSteps_1.serializeIntermediateSteps; } });
|
|
22
|
+
var types_1 = require("./types");
|
|
23
|
+
Object.defineProperty(exports, "INTERNAL_TOOL_ARG_STASH_KEY", { enumerable: true, get: function () { return types_1.INTERNAL_TOOL_ARG_STASH_KEY; } });
|
|
22
24
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../utils/agent-execution/index.ts"],"names":[],"mappings":";;;AAUA,+DAA8D;AAArD,4HAAA,oBAAoB,OAAA;AAC7B,6DAA4D;AAAnD,0HAAA,mBAAmB,OAAA;AAC5B,iEAAgE;AAAvD,8HAAA,qBAAqB,OAAA;AAC9B,2CAA0C;AAAjC,wGAAA,UAAU,OAAA;AACnB,2DAA0D;AAAjD,wHAAA,kBAAkB,OAAA;AAC3B,uDAAgF;AAAvE,8GAAA,UAAU,OAAA;AAAE,gHAAA,YAAY,OAAA;AAAE,oHAAA,gBAAgB,OAAA;AACnD,+DAAyF;AAAhF,4HAAA,oBAAoB,OAAA;AAC7B,2EAA0E;AAAjE,wIAAA,0BAA0B,OAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../utils/agent-execution/index.ts"],"names":[],"mappings":";;;AAUA,+DAA8D;AAArD,4HAAA,oBAAoB,OAAA;AAC7B,6DAA4D;AAAnD,0HAAA,mBAAmB,OAAA;AAC5B,iEAAgE;AAAvD,8HAAA,qBAAqB,OAAA;AAC9B,2CAA0C;AAAjC,wGAAA,UAAU,OAAA;AACnB,2DAA0D;AAAjD,wHAAA,kBAAkB,OAAA;AAC3B,uDAAgF;AAAvE,8GAAA,UAAU,OAAA;AAAE,gHAAA,YAAY,OAAA;AAAE,oHAAA,gBAAgB,OAAA;AACnD,+DAAyF;AAAhF,4HAAA,oBAAoB,OAAA;AAC7B,2EAA0E;AAAjE,wIAAA,0BAA0B,OAAA;AAYnC,iCAAsD;AAA7C,oHAAA,2BAA2B,OAAA"}
|
|
@@ -69,8 +69,9 @@ function processHitlResponses(response, itemIndex) {
|
|
|
69
69
|
if (approved === true) {
|
|
70
70
|
hasApprovedHitlTools = true;
|
|
71
71
|
const input = typeof hitl.originalInput === 'object'
|
|
72
|
-
? {
|
|
73
|
-
: {
|
|
72
|
+
? { ...hitl.originalInput }
|
|
73
|
+
: { input: hitl.originalInput };
|
|
74
|
+
input.tool = hitl.toolName;
|
|
74
75
|
pendingGatedToolActions.push({
|
|
75
76
|
actionType: 'ExecutionNodeAction',
|
|
76
77
|
nodeName: hitl.gatedToolNodeName,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"processHitlResponses.js","sourceRoot":"","sources":["../../../utils/agent-execution/processHitlResponses.ts"],"names":[],"mappings":";;;AAAA,+CAAmD;AAyBnD,SAAS,oBAAoB,CAC5B,cAA0D;IAI1D,MAAM,IAAI,GAAI,cAAc,CAAC,MAAM,EAAE,QAAgD,EAAE,IAAI,CAAC;IAC5F,OAAO,IAAI,KAAK,SAAS,CAAC;AAC3B,CAAC;AAKD,SAAS,cAAc,CAAC,IAAa;IACpC,OAAO,CACN,OAAO,IAAI,KAAK,QAAQ;QACxB,IAAI,KAAK,IAAI;QACb,UAAU,IAAI,IAAI;QAClB,OAAQ,IAAgC,CAAC,QAAQ,KAAK,SAAS,CAC/D,CAAC;AACH,CAAC;AAED,SAAS,qBAAqB,CAAC,cAA0D;IACxF,OAAO,cAAc,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC;AAC3D,CAAC;AAKD,SAAS,iBAAiB,CACzB,cAA0D;IAE1D,MAAM,IAAI,GAAG,qBAAqB,CAAC,cAAc,CAAC,CAAC;IAEnD,IAAI,cAAc,CAAC,IAAI,CAAC,EAAE,CAAC;QAC1B,OAAO,IAAI,CAAC,QAAQ,CAA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own> {
|
|
|
85
85
|
gatedToolNodeName?: string;
|
|
86
86
|
originalSchema?: ZodType;
|
|
87
87
|
isFromToolkit?: boolean;
|
|
88
|
+
isMcpTool?: boolean;
|
|
88
89
|
attribution?: string;
|
|
89
90
|
}
|
|
90
91
|
export declare function isThinkingBlock(block: unknown): block is ThinkingContentBlock;
|
|
92
|
+
export declare const INTERNAL_TOOL_ARG_STASH_KEY = "_n8nOriginalToolArg";
|
|
91
93
|
export declare function isRedactedThinkingBlock(block: unknown): block is RedactedThinkingContentBlock;
|
|
92
94
|
export declare function isGeminiThoughtSignatureBlock(block: unknown): block is GeminiThoughtSignatureBlock;
|