@n8n/n8n-nodes-langchain 2.44.1 → 2.45.0

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.
Files changed (190) hide show
  1. package/dist/credentials/AzureEntraCognitiveServicesOAuth2Api.credentials.js +8 -0
  2. package/dist/credentials/AzureEntraCognitiveServicesOAuth2Api.credentials.js.map +1 -1
  3. package/dist/credentials/AzureOpenAiApi.credentials.js +8 -0
  4. package/dist/credentials/AzureOpenAiApi.credentials.js.map +1 -1
  5. package/dist/known/nodes.json +4 -0
  6. package/dist/methods/defined.json +3 -0
  7. package/dist/methods/referenced.json +3 -0
  8. package/dist/node-definitions/.nodes-hash +1 -1
  9. package/dist/node-definitions/index.ts +12 -0
  10. package/dist/node-definitions/nodes/n8n-nodes-langchain/chatTrigger/v1.schema.js +1 -0
  11. package/dist/node-definitions/nodes/n8n-nodes-langchain/chatTrigger/v1.ts +7 -0
  12. package/dist/node-definitions/nodes/n8n-nodes-langchain/chatTrigger/v11.schema.js +1 -0
  13. package/dist/node-definitions/nodes/n8n-nodes-langchain/chatTrigger/v11.ts +7 -0
  14. package/dist/node-definitions/nodes/n8n-nodes-langchain/chatTrigger/v12.schema.js +1 -0
  15. package/dist/node-definitions/nodes/n8n-nodes-langchain/chatTrigger/v12.ts +7 -0
  16. package/dist/node-definitions/nodes/n8n-nodes-langchain/chatTrigger/v13.schema.js +1 -0
  17. package/dist/node-definitions/nodes/n8n-nodes-langchain/chatTrigger/v13.ts +7 -0
  18. package/dist/node-definitions/nodes/n8n-nodes-langchain/chatTrigger/v14.schema.js +1 -0
  19. package/dist/node-definitions/nodes/n8n-nodes-langchain/chatTrigger/v14.ts +7 -0
  20. package/dist/node-definitions/nodes/n8n-nodes-langchain/chatTrigger/v15.schema.js +1 -0
  21. package/dist/node-definitions/nodes/n8n-nodes-langchain/chatTrigger/v15.ts +7 -0
  22. package/dist/node-definitions/nodes/n8n-nodes-langchain/databricksAiAgent/index.ts +12 -0
  23. package/dist/node-definitions/nodes/n8n-nodes-langchain/databricksAiAgent/v22.schema.js +39 -0
  24. package/dist/node-definitions/nodes/n8n-nodes-langchain/databricksAiAgent/v22.ts +144 -0
  25. package/dist/node-definitions/nodes/n8n-nodes-langchain/embeddingsDatabricks/index.ts +12 -0
  26. package/dist/node-definitions/nodes/n8n-nodes-langchain/embeddingsDatabricks/v1.schema.js +25 -0
  27. package/dist/node-definitions/nodes/n8n-nodes-langchain/embeddingsDatabricks/v1.ts +51 -0
  28. package/dist/node-definitions/nodes/n8n-nodes-langchain/lmChatAzureOpenAi/v1.ts +1 -1
  29. package/dist/node-definitions/nodes/n8n-nodes-langchain/lmChatAzureOpenAi/v11.ts +1 -1
  30. package/dist/node-definitions/nodes/n8n-nodes-langchain/lmChatOpenRouter/v1.schema.js +1 -1
  31. package/dist/node-definitions/nodes/n8n-nodes-langchain/lmChatOpenRouter/v1.ts +4 -0
  32. package/dist/node-definitions/nodes/n8n-nodes-langchain/textClassifier/v1.schema.js +2 -2
  33. package/dist/node-definitions/nodes/n8n-nodes-langchain/textClassifier/v1.ts +4 -0
  34. package/dist/node-definitions/nodes/n8n-nodes-langchain/textClassifier/v11.schema.js +2 -2
  35. package/dist/node-definitions/nodes/n8n-nodes-langchain/textClassifier/v11.ts +4 -0
  36. package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStoreDatabricks/index.ts +18 -0
  37. package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStoreDatabricks/v1/index.schema.js +26 -0
  38. package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStoreDatabricks/v1/index.ts +21 -0
  39. package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStoreDatabricks/v1/mode_insert.schema.js +29 -0
  40. package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStoreDatabricks/v1/mode_insert.ts +51 -0
  41. package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStoreDatabricks/v1/mode_load.schema.js +36 -0
  42. package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStoreDatabricks/v1/mode_load.ts +92 -0
  43. package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStoreDatabricks/v1/mode_retrieve.schema.js +33 -0
  44. package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStoreDatabricks/v1/mode_retrieve.ts +83 -0
  45. package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStoreDatabricks/v1/mode_retrieve_as_tool.schema.js +37 -0
  46. package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStoreDatabricks/v1/mode_retrieve_as_tool.ts +106 -0
  47. package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStoreDatabricks/v11/index.schema.js +26 -0
  48. package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStoreDatabricks/v11/index.ts +21 -0
  49. package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStoreDatabricks/v11/mode_insert.schema.js +30 -0
  50. package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStoreDatabricks/v11/mode_insert.ts +56 -0
  51. package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStoreDatabricks/v11/mode_load.schema.js +36 -0
  52. package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStoreDatabricks/v11/mode_load.ts +92 -0
  53. package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStoreDatabricks/v11/mode_retrieve.schema.js +33 -0
  54. package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStoreDatabricks/v11/mode_retrieve.ts +83 -0
  55. package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStoreDatabricks/v11/mode_retrieve_as_tool.schema.js +37 -0
  56. package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStoreDatabricks/v11/mode_retrieve_as_tool.ts +106 -0
  57. package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStoreDatabricks/v12/index.schema.js +26 -0
  58. package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStoreDatabricks/v12/index.ts +21 -0
  59. package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStoreDatabricks/v12/mode_insert.schema.js +30 -0
  60. package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStoreDatabricks/v12/mode_insert.ts +56 -0
  61. package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStoreDatabricks/v12/mode_load.schema.js +36 -0
  62. package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStoreDatabricks/v12/mode_load.ts +92 -0
  63. package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStoreDatabricks/v12/mode_retrieve.schema.js +33 -0
  64. package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStoreDatabricks/v12/mode_retrieve.ts +83 -0
  65. package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStoreDatabricks/v12/mode_retrieve_as_tool.schema.js +37 -0
  66. package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStoreDatabricks/v12/mode_retrieve_as_tool.ts +106 -0
  67. package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStoreDatabricks/v13/index.schema.js +26 -0
  68. package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStoreDatabricks/v13/index.ts +21 -0
  69. package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStoreDatabricks/v13/mode_insert.schema.js +30 -0
  70. package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStoreDatabricks/v13/mode_insert.ts +56 -0
  71. package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStoreDatabricks/v13/mode_load.schema.js +36 -0
  72. package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStoreDatabricks/v13/mode_load.ts +92 -0
  73. package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStoreDatabricks/v13/mode_retrieve.schema.js +33 -0
  74. package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStoreDatabricks/v13/mode_retrieve.ts +83 -0
  75. package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStoreDatabricks/v13/mode_retrieve_as_tool.schema.js +36 -0
  76. package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStoreDatabricks/v13/mode_retrieve_as_tool.ts +102 -0
  77. package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStorePGVector/v1/mode_insert.schema.js +1 -1
  78. package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStorePGVector/v1/mode_insert.ts +4 -0
  79. package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStorePGVector/v1/mode_load.schema.js +1 -1
  80. package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStorePGVector/v1/mode_load.ts +4 -0
  81. package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStorePGVector/v1/mode_retrieve.schema.js +1 -1
  82. package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStorePGVector/v1/mode_retrieve.ts +4 -0
  83. package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStorePGVector/v1/mode_retrieve_as_tool.schema.js +1 -1
  84. package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStorePGVector/v1/mode_retrieve_as_tool.ts +4 -0
  85. package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStorePGVector/v11/mode_insert.schema.js +1 -1
  86. package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStorePGVector/v11/mode_insert.ts +4 -0
  87. package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStorePGVector/v11/mode_load.schema.js +1 -1
  88. package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStorePGVector/v11/mode_load.ts +4 -0
  89. package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStorePGVector/v11/mode_retrieve.schema.js +1 -1
  90. package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStorePGVector/v11/mode_retrieve.ts +4 -0
  91. package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStorePGVector/v11/mode_retrieve_as_tool.schema.js +1 -1
  92. package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStorePGVector/v11/mode_retrieve_as_tool.ts +4 -0
  93. package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStorePGVector/v12/mode_insert.schema.js +1 -1
  94. package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStorePGVector/v12/mode_insert.ts +4 -0
  95. package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStorePGVector/v12/mode_load.schema.js +1 -1
  96. package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStorePGVector/v12/mode_load.ts +4 -0
  97. package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStorePGVector/v12/mode_retrieve.schema.js +1 -1
  98. package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStorePGVector/v12/mode_retrieve.ts +4 -0
  99. package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStorePGVector/v12/mode_retrieve_as_tool.schema.js +1 -1
  100. package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStorePGVector/v12/mode_retrieve_as_tool.ts +4 -0
  101. package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStorePGVector/v13/mode_insert.schema.js +1 -1
  102. package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStorePGVector/v13/mode_insert.ts +4 -0
  103. package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStorePGVector/v13/mode_load.schema.js +1 -1
  104. package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStorePGVector/v13/mode_load.ts +4 -0
  105. package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStorePGVector/v13/mode_retrieve.schema.js +1 -1
  106. package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStorePGVector/v13/mode_retrieve.ts +4 -0
  107. package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStorePGVector/v13/mode_retrieve_as_tool.schema.js +1 -1
  108. package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStorePGVector/v13/mode_retrieve_as_tool.ts +4 -0
  109. package/dist/nodes/agents/Agent/agents/ToolsAgent/V3/helpers/runAgent.js +3 -1
  110. package/dist/nodes/agents/Agent/agents/ToolsAgent/V3/helpers/runAgent.js.map +1 -1
  111. package/dist/nodes/chains/TextClassifier/TextClassifier.node.js +72 -28
  112. package/dist/nodes/chains/TextClassifier/TextClassifier.node.js.map +1 -1
  113. package/dist/nodes/chains/TextClassifier/classification.d.ts +21 -0
  114. package/dist/nodes/chains/TextClassifier/classification.js +73 -0
  115. package/dist/nodes/chains/TextClassifier/classification.js.map +1 -0
  116. package/dist/nodes/chains/TextClassifier/processItem.d.ts +3 -5
  117. package/dist/nodes/chains/TextClassifier/processItem.js +3 -3
  118. package/dist/nodes/chains/TextClassifier/processItem.js.map +1 -1
  119. package/dist/nodes/embeddings/EmbeddingsDatabricks/EmbeddingsDatabricks.node.js +0 -1
  120. package/dist/nodes/embeddings/EmbeddingsDatabricks/EmbeddingsDatabricks.node.js.map +1 -1
  121. package/dist/nodes/llms/LmChatAzureOpenAi/methods/searchModels.js +5 -2
  122. package/dist/nodes/llms/LmChatAzureOpenAi/methods/searchModels.js.map +1 -1
  123. package/dist/nodes/llms/LmChatAzureOpenAi/properties.js +1 -1
  124. package/dist/nodes/llms/LmChatAzureOpenAi/properties.js.map +1 -1
  125. package/dist/nodes/llms/LmChatAzureOpenAi/types.d.ts +1 -0
  126. package/dist/nodes/llms/LmChatOpenRouter/LmChatOpenRouter.node.js +53 -21
  127. package/dist/nodes/llms/LmChatOpenRouter/LmChatOpenRouter.node.js.map +1 -1
  128. package/dist/nodes/llms/N8nNonEstimatingTracing.js +1 -5
  129. package/dist/nodes/llms/N8nNonEstimatingTracing.js.map +1 -1
  130. package/dist/nodes/mcp/McpTrigger/McpServer.js +2 -2
  131. package/dist/nodes/mcp/McpTrigger/McpServer.js.map +1 -1
  132. package/dist/nodes/mcp/McpTrigger/protocol/MessageFormatter.d.ts +1 -1
  133. package/dist/nodes/mcp/McpTrigger/protocol/MessageFormatter.js +23 -15
  134. package/dist/nodes/mcp/McpTrigger/protocol/MessageFormatter.js.map +1 -1
  135. package/dist/nodes/mcp/McpTrigger/protocol/types.d.ts +2 -4
  136. package/dist/nodes/mcp/McpTrigger/protocol/types.js.map +1 -1
  137. package/dist/nodes/mcp/shared/utils.d.ts +3 -1
  138. package/dist/nodes/mcp/shared/utils.js +7 -0
  139. package/dist/nodes/mcp/shared/utils.js.map +1 -1
  140. package/dist/nodes/memory/MemoryLakebaseChat/MemoryLakebaseChat.node.d.ts +34 -0
  141. package/dist/nodes/memory/MemoryLakebaseChat/MemoryLakebaseChat.node.js +218 -0
  142. package/dist/nodes/memory/MemoryLakebaseChat/MemoryLakebaseChat.node.js.map +1 -0
  143. package/dist/nodes/trigger/ChatTrigger/ChatTrigger.node.d.ts +6 -0
  144. package/dist/nodes/trigger/ChatTrigger/ChatTrigger.node.js +26 -1
  145. package/dist/nodes/trigger/ChatTrigger/ChatTrigger.node.js.map +1 -1
  146. package/dist/nodes/trigger/ChatTrigger/GenericFunctions.js +18 -4
  147. package/dist/nodes/trigger/ChatTrigger/GenericFunctions.js.map +1 -1
  148. package/dist/nodes/trigger/ChatTrigger/error.d.ts +2 -1
  149. package/dist/nodes/trigger/ChatTrigger/error.js +2 -1
  150. package/dist/nodes/trigger/ChatTrigger/error.js.map +1 -1
  151. package/dist/nodes/vector_store/VectorStoreDatabricks/DatabricksVectorStore.d.ts +4 -0
  152. package/dist/nodes/vector_store/VectorStoreDatabricks/DatabricksVectorStore.js +32 -0
  153. package/dist/nodes/vector_store/VectorStoreDatabricks/DatabricksVectorStore.js.map +1 -1
  154. package/dist/nodes/vector_store/VectorStoreDatabricks/VectorStoreDatabricks.node.js +1 -2
  155. package/dist/nodes/vector_store/VectorStoreDatabricks/VectorStoreDatabricks.node.js.map +1 -1
  156. package/dist/nodes/vector_store/VectorStorePGVector/VectorStorePGVector.node.js +20 -3
  157. package/dist/nodes/vector_store/VectorStorePGVector/VectorStorePGVector.node.js.map +1 -1
  158. package/dist/nodes/vendors/Databricks/DatabricksAiAgent.node.js +34 -1
  159. package/dist/nodes/vendors/Databricks/DatabricksAiAgent.node.js.map +1 -1
  160. package/dist/nodes/vendors/Databricks/mlflow/span-collector.js +3 -0
  161. package/dist/nodes/vendors/Databricks/mlflow/span-collector.js.map +1 -1
  162. package/dist/nodes/vendors/OpenAi/helpers/interfaces.d.ts +1 -0
  163. package/dist/nodes/vendors/OpenAi/helpers/token-usage.d.ts +7 -0
  164. package/dist/nodes/vendors/OpenAi/helpers/token-usage.js +15 -0
  165. package/dist/nodes/vendors/OpenAi/helpers/token-usage.js.map +1 -0
  166. package/dist/nodes/vendors/OpenAi/v1/actions/image/analyze.operation.js +1 -1
  167. package/dist/nodes/vendors/OpenAi/v1/actions/image/analyze.operation.js.map +1 -1
  168. package/dist/nodes/vendors/OpenAi/v2/actions/image/analyze.operation.js +2 -0
  169. package/dist/nodes/vendors/OpenAi/v2/actions/image/analyze.operation.js.map +1 -1
  170. package/dist/nodes/vendors/OpenAi/v2/actions/image/edit.operation.js +2 -0
  171. package/dist/nodes/vendors/OpenAi/v2/actions/image/edit.operation.js.map +1 -1
  172. package/dist/nodes/vendors/OpenAi/v2/actions/image/generate.operation.js +7 -2
  173. package/dist/nodes/vendors/OpenAi/v2/actions/image/generate.operation.js.map +1 -1
  174. package/dist/nodes/vendors/OpenAi/v2/actions/text/response.operation.js +8 -1
  175. package/dist/nodes/vendors/OpenAi/v2/actions/text/response.operation.js.map +1 -1
  176. package/dist/typecheck.tsbuildinfo +1 -1
  177. package/dist/types/credentials.json +2 -2
  178. package/dist/types/nodes.json +9 -8
  179. package/dist/utils/agent-execution/buildSteps.js +51 -12
  180. package/dist/utils/agent-execution/buildSteps.js.map +1 -1
  181. package/dist/utils/agent-execution/types.d.ts +2 -0
  182. package/dist/utils/agent-execution/types.js.map +1 -1
  183. package/dist/utils/databricks/error-handling.js +4 -3
  184. package/dist/utils/databricks/error-handling.js.map +1 -1
  185. package/dist/utils/output_parsers/langchainParserError.js +2 -3
  186. package/dist/utils/output_parsers/langchainParserError.js.map +1 -1
  187. package/dist/utils/tool-error-result.d.ts +1 -0
  188. package/dist/utils/tool-error-result.js +14 -0
  189. package/dist/utils/tool-error-result.js.map +1 -0
  190. package/package.json +12 -11
@@ -11,7 +11,7 @@ export interface LcLmChatAzureOpenAiV1Params {
11
11
  */
12
12
  model: string | Expression<string>;
13
13
  /**
14
- * The Microsoft Foundry project that owns the deployment. Required for a Microsoft Foundry resource; leave empty for a classic Azure OpenAI resource.
14
+ * The Microsoft Foundry project that owns the deployment. Leave empty to use the project from the credential. A classic Azure OpenAI resource does not use it.
15
15
  */
16
16
  project?: string | Expression<string>;
17
17
  /**
@@ -7,7 +7,7 @@
7
7
  export interface LcLmChatAzureOpenAiV11Params {
8
8
  authentication?: 'azureOpenAiApi' | 'azureEntraCognitiveServicesOAuth2Api' | Expression<string>;
9
9
  /**
10
- * The Microsoft Foundry project that owns the deployment. Required for a Microsoft Foundry resource; leave empty for a classic Azure OpenAI resource.
10
+ * The Microsoft Foundry project that owns the deployment. Leave empty to use the project from the credential. A classic Azure OpenAI resource does not use it.
11
11
  */
12
12
  project?: string | Expression<string>;
13
13
  /**
@@ -15,7 +15,7 @@ module.exports = function getSchema({ parameters, z, expressionSchema, stringOrE
15
15
  // Parameters schema
16
16
  const parametersSchema = z.object({
17
17
  model: stringOrExpression.optional(),
18
- options: z.object({ frequencyPenalty: numberOrExpression.optional(), maxTokens: numberOrExpression.optional(), responseFormat: z.union([z.literal('text'), z.literal('json_object'), expressionSchema]).optional(), presencePenalty: numberOrExpression.optional(), temperature: numberOrExpression.optional(), timeout: numberOrExpression.optional(), maxRetries: numberOrExpression.optional(), topP: numberOrExpression.optional(), providerRouting: z.object({ order: stringOrExpression.optional(), allowFallbacks: booleanOrExpression.optional(), requireParameters: booleanOrExpression.optional(), dataCollection: z.union([z.literal('allow'), z.literal('deny'), expressionSchema]).optional(), zdr: booleanOrExpression.optional(), only: stringOrExpression.optional(), ignore: stringOrExpression.optional(), sort: z.union([z.literal('price'), z.literal('throughput'), z.literal('latency'), expressionSchema]).optional() }).optional() }).optional(),
18
+ options: z.object({ reasoningEffort: z.union([z.literal('xhigh'), z.literal('high'), z.literal('low'), z.literal('medium'), z.literal('minimal'), expressionSchema]).optional(), frequencyPenalty: numberOrExpression.optional(), maxTokens: numberOrExpression.optional(), responseFormat: z.union([z.literal('text'), z.literal('json_object'), expressionSchema]).optional(), presencePenalty: numberOrExpression.optional(), temperature: numberOrExpression.optional(), timeout: numberOrExpression.optional(), maxRetries: numberOrExpression.optional(), topP: numberOrExpression.optional(), providerRouting: z.object({ order: stringOrExpression.optional(), allowFallbacks: booleanOrExpression.optional(), requireParameters: booleanOrExpression.optional(), dataCollection: z.union([z.literal('allow'), z.literal('deny'), expressionSchema]).optional(), zdr: booleanOrExpression.optional(), only: stringOrExpression.optional(), ignore: stringOrExpression.optional(), sort: z.union([z.literal('price'), z.literal('throughput'), z.literal('latency'), expressionSchema]).optional() }).optional() }).optional(),
19
19
  });
20
20
 
21
21
  // Return combined config schema
@@ -16,6 +16,10 @@ export interface LcLmChatOpenRouterV1Params {
16
16
  * @default {}
17
17
  */
18
18
  options?: {
19
+ /** Controls the amount of reasoning effort the model will use to generate a response. Higher values may result in more accurate and detailed responses, but may also take longer to generate.
20
+ * @default medium
21
+ */
22
+ reasoningEffort?: 'xhigh' | 'high' | 'low' | 'medium' | 'minimal' | Expression<string>;
19
23
  /** Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim
20
24
  * @default 0
21
25
  */
@@ -10,7 +10,7 @@
10
10
  * @generated - CommonJS JavaScript for runtime loading
11
11
  */
12
12
 
13
- module.exports = function getSchema({ parameters, z, expressionSchema, stringOrExpression, numberOrExpression, booleanOrExpression, resourceLocatorValueSchema, resourceMapperValueSchema, filterValueSchema, assignmentCollectionValueSchema, iDataObjectSchema, languageModelInstanceSchema }) {
13
+ module.exports = function getSchema({ parameters, z, expressionSchema, stringOrExpression, numberOrExpression, booleanOrExpression, resourceLocatorValueSchema, resourceMapperValueSchema, filterValueSchema, assignmentCollectionValueSchema, iDataObjectSchema, resolveSchema, resolveOneOfSchemas, languageModelInstanceSchema }) {
14
14
 
15
15
  // Static subnode schema
16
16
  const subnodesSchema = z.object({
@@ -21,7 +21,7 @@ module.exports = function getSchema({ parameters, z, expressionSchema, stringOrE
21
21
  const parametersSchema = z.object({
22
22
  inputText: stringOrExpression,
23
23
  categories: z.object({ categories: z.array(z.object({ category: stringOrExpression.optional(), description: stringOrExpression.optional() })).optional() }).optional(),
24
- options: z.object({ multiClass: booleanOrExpression.optional(), fallback: z.union([z.literal('discard'), z.literal('other'), expressionSchema]).optional(), systemPromptTemplate: stringOrExpression.optional(), enableAutoFixing: booleanOrExpression.optional() }).optional(),
24
+ options: z.object({ multiClass: booleanOrExpression.optional(), fallback: z.union([z.literal('discard'), z.literal('other'), expressionSchema]).optional(), includeConfidenceScores: booleanOrExpression.optional(), systemPromptTemplate: stringOrExpression.optional(), enableAutoFixing: booleanOrExpression.optional() }).optional(),
25
25
  });
26
26
 
27
27
  // Return combined config schema
@@ -30,6 +30,10 @@ export interface LcTextClassifierV1Params {
30
30
  * @default discard
31
31
  */
32
32
  fallback?: 'discard' | 'other' | Expression<string>;
33
+ /** Whether to add a classification field to each item with the model's confidence score for every category
34
+ * @default false
35
+ */
36
+ includeConfidenceScores?: boolean | Expression<boolean>;
33
37
  /** String to use directly as the system prompt template
34
38
  * @default Please classify the text provided by the user into one of the following categories: {categories}, and use the provided formatting instructions below. Don't explain, and only output the json.
35
39
  */
@@ -10,7 +10,7 @@
10
10
  * @generated - CommonJS JavaScript for runtime loading
11
11
  */
12
12
 
13
- module.exports = function getSchema({ parameters, z, expressionSchema, stringOrExpression, numberOrExpression, booleanOrExpression, resourceLocatorValueSchema, resourceMapperValueSchema, filterValueSchema, assignmentCollectionValueSchema, iDataObjectSchema, languageModelInstanceSchema }) {
13
+ module.exports = function getSchema({ parameters, z, expressionSchema, stringOrExpression, numberOrExpression, booleanOrExpression, resourceLocatorValueSchema, resourceMapperValueSchema, filterValueSchema, assignmentCollectionValueSchema, iDataObjectSchema, resolveSchema, resolveOneOfSchemas, languageModelInstanceSchema }) {
14
14
 
15
15
  // Static subnode schema
16
16
  const subnodesSchema = z.object({
@@ -21,7 +21,7 @@ module.exports = function getSchema({ parameters, z, expressionSchema, stringOrE
21
21
  const parametersSchema = z.object({
22
22
  inputText: stringOrExpression,
23
23
  categories: z.object({ categories: z.array(z.object({ category: stringOrExpression.optional(), description: stringOrExpression.optional() })).optional() }).optional(),
24
- options: z.object({ multiClass: booleanOrExpression.optional(), fallback: z.union([z.literal('discard'), z.literal('other'), expressionSchema]).optional(), systemPromptTemplate: stringOrExpression.optional(), enableAutoFixing: booleanOrExpression.optional(), batching: z.object({ batchSize: numberOrExpression.optional(), delayBetweenBatches: numberOrExpression.optional() }).optional() }).optional(),
24
+ options: z.object({ multiClass: booleanOrExpression.optional(), fallback: z.union([z.literal('discard'), z.literal('other'), expressionSchema]).optional(), includeConfidenceScores: booleanOrExpression.optional(), systemPromptTemplate: stringOrExpression.optional(), enableAutoFixing: booleanOrExpression.optional(), batching: z.object({ batchSize: numberOrExpression.optional(), delayBetweenBatches: numberOrExpression.optional() }).optional() }).optional(),
25
25
  });
26
26
 
27
27
  // Return combined config schema
@@ -30,6 +30,10 @@ export interface LcTextClassifierV11Params {
30
30
  * @default discard
31
31
  */
32
32
  fallback?: 'discard' | 'other' | Expression<string>;
33
+ /** Whether to add a classification field to each item with the model's confidence score for every category
34
+ * @default false
35
+ */
36
+ includeConfidenceScores?: boolean | Expression<boolean>;
33
37
  /** String to use directly as the system prompt template
34
38
  * @default Please classify the text provided by the user into one of the following categories: {categories}, and use the provided formatting instructions below. Don't explain, and only output the json.
35
39
  */
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Databricks Vector Store Node Types
3
+ *
4
+ * Re-exports all version-specific types and provides combined union type.
5
+ */
6
+
7
+ import type { LcVectorStoreDatabricksV13Node } from './v13';
8
+ import type { LcVectorStoreDatabricksV12Node } from './v12';
9
+ import type { LcVectorStoreDatabricksV11Node } from './v11';
10
+ import type { LcVectorStoreDatabricksV1Node } from './v1';
11
+
12
+ export * from './v13';
13
+ export * from './v12';
14
+ export * from './v11';
15
+ export * from './v1';
16
+
17
+ // Combined union type for all versions
18
+ export type LcVectorStoreDatabricksNode = LcVectorStoreDatabricksV13Node | LcVectorStoreDatabricksV12Node | LcVectorStoreDatabricksV11Node | LcVectorStoreDatabricksV1Node;
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Databricks Vector Store Node - Version 1 - Zod Schema Factory
3
+ * Exports a factory that unions all discriminator schemas.
4
+ *
5
+ * Schema helpers (z, expressionSchema, etc.) are passed as parameters
6
+ * by the schema-validator, not imported from external files.
7
+ *
8
+ * @generated - CommonJS JavaScript for runtime loading
9
+ */
10
+
11
+ const getInsertSchema = require('./mode_insert.schema');
12
+ const getLoadSchema = require('./mode_load.schema');
13
+ const getRetrieveSchema = require('./mode_retrieve.schema');
14
+ const getRetrieveAsToolSchema = require('./mode_retrieve_as_tool.schema');
15
+
16
+ module.exports = function getSchema(helpers) {
17
+ const { parameters, z } = helpers;
18
+ // Apply discriminator default if not set
19
+ const effectiveParams = parameters.mode === undefined ? { ...parameters, mode: 'retrieve' } : parameters;
20
+ return z.union([
21
+ getInsertSchema({ ...helpers, parameters: effectiveParams }),
22
+ getLoadSchema({ ...helpers, parameters: effectiveParams }),
23
+ getRetrieveSchema({ ...helpers, parameters: effectiveParams }),
24
+ getRetrieveAsToolSchema({ ...helpers, parameters: effectiveParams }),
25
+ ]);
26
+ };
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Databricks Vector Store Node - Version 1
3
+ * Re-exports all discriminator combinations.
4
+ */
5
+
6
+ import type { LcVectorStoreDatabricksV1InsertNode } from './mode_insert';
7
+ import type { LcVectorStoreDatabricksV1LoadNode } from './mode_load';
8
+ import type { LcVectorStoreDatabricksV1RetrieveNode } from './mode_retrieve';
9
+ import type { LcVectorStoreDatabricksV1RetrieveAsToolNode } from './mode_retrieve_as_tool';
10
+
11
+ export * from './mode_insert';
12
+ export * from './mode_load';
13
+ export * from './mode_retrieve';
14
+ export * from './mode_retrieve_as_tool';
15
+
16
+ export type LcVectorStoreDatabricksV1Node =
17
+ | LcVectorStoreDatabricksV1InsertNode
18
+ | LcVectorStoreDatabricksV1LoadNode
19
+ | LcVectorStoreDatabricksV1RetrieveNode
20
+ | LcVectorStoreDatabricksV1RetrieveAsToolNode
21
+ ;
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Databricks Vector Store Node - Version 1 - Zod Schema
3
+ * Discriminator: mode=insert
4
+ *
5
+ * Use .parse() for strict validation or .safeParse() for error handling.
6
+ *
7
+ * Schema helpers (z, expressionSchema, etc.) are passed as parameters
8
+ * by the schema-validator, not imported from external files.
9
+ *
10
+ * @generated - CommonJS JavaScript for runtime loading
11
+ */
12
+
13
+ module.exports = function getSchema({ parameters, z, expressionSchema, stringOrExpression, numberOrExpression, booleanOrExpression, resourceLocatorValueSchema, resourceMapperValueSchema, filterValueSchema, assignmentCollectionValueSchema, iDataObjectSchema, embeddingInstanceSchema, documentLoaderInstanceSchema }) {
14
+
15
+ // Static subnode schema
16
+ const subnodesSchema = z.object({
17
+ embedding: z.union([embeddingInstanceSchema, z.array(embeddingInstanceSchema)]),
18
+ documentLoader: z.union([documentLoaderInstanceSchema, z.array(documentLoaderInstanceSchema)]),
19
+ }).strict();
20
+
21
+ return z.object({
22
+ parameters: z.object({
23
+ mode: z.literal('insert'),
24
+ databricksIndex: z.union([z.object({ __rl: z.literal(true), mode: z.union([z.literal('list'), z.literal('id')]), value: z.union([z.string(), z.number()]), cachedResultName: z.string().optional(), cachedResultUrl: z.string().optional() }), expressionSchema]).optional(),
25
+ contentColumn: stringOrExpression.optional(),
26
+ }).optional(),
27
+ subnodes: subnodesSchema,
28
+ });
29
+ };
@@ -0,0 +1,51 @@
1
+ /**
2
+ * Databricks Vector Store Node - Version 1
3
+ * Discriminator: mode=insert
4
+ */
5
+
6
+
7
+ interface Credentials {
8
+ databricksOAuth2Api: CredentialReference;
9
+ }
10
+
11
+ /** Insert documents into vector store */
12
+ export type LcVectorStoreDatabricksV1InsertParams = {
13
+ /**
14
+ * 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.
15
+ * <patterns>
16
+ * <pattern title="insert mode — upsert documents (generic, works for any vectorStore* node)">
17
+ * // Substitute the type literal and provider-specific parameters (e.g. pineconeIndex,
18
+ * // qdrantCollection, supabaseTableName) — see the rest of this file for the exact shape.
19
+ * const store = vectorStore({
20
+ * type: '@n8n/n8n-nodes-langchain.vectorStoreXxx',
21
+ * config: {
22
+ * name: 'Knowledge Base',
23
+ * parameters: {
24
+ * mode: 'insert',
25
+ * // ...provider-specific parameters
26
+ * },
27
+ * subnodes: { embedding: embeddingsOpenAi, documentLoader: defaultDataLoader }
28
+ * }
29
+ * });
30
+ * </pattern>
31
+ * </patterns>
32
+ */
33
+ mode: 'insert';
34
+ databricksIndex?: { __rl: true; mode: 'list' | 'id'; value: string; cachedResultName?: string };
35
+ /**
36
+ * Column that becomes the document text. Leave empty on a managed-embedding index to use its embedding source column. Choose from the list, or specify an ID using an &lt;a href="https://docs.n8n.io/code/expressions/"&gt;expression&lt;/a&gt;.
37
+ * @loadOptionsMethod getIndexColumns
38
+ */
39
+ contentColumn?: string | Expression<string>;
40
+ };
41
+
42
+ export interface LcVectorStoreDatabricksV1InsertSubnodeConfig {
43
+ embedding: EmbeddingInstance | EmbeddingInstance[];
44
+ documentLoader: DocumentLoaderInstance | DocumentLoaderInstance[];
45
+ }
46
+
47
+ export type LcVectorStoreDatabricksV1InsertNode = {
48
+ type: '@n8n/n8n-nodes-langchain.vectorStoreDatabricks';
49
+ version: 1;
50
+ config: NodeConfig<LcVectorStoreDatabricksV1InsertParams> & { credentials?: Credentials } & { subnodes: LcVectorStoreDatabricksV1InsertSubnodeConfig };
51
+ };
@@ -0,0 +1,36 @@
1
+ /**
2
+ * Databricks Vector Store Node - Version 1 - Zod Schema
3
+ * Discriminator: mode=load
4
+ *
5
+ * Use .parse() for strict validation or .safeParse() for error handling.
6
+ *
7
+ * Schema helpers (z, expressionSchema, etc.) are passed as parameters
8
+ * by the schema-validator, not imported from external files.
9
+ *
10
+ * @generated - CommonJS JavaScript for runtime loading
11
+ */
12
+
13
+ module.exports = function getSchema({ parameters, z, expressionSchema, stringOrExpression, numberOrExpression, booleanOrExpression, resourceLocatorValueSchema, resourceMapperValueSchema, filterValueSchema, assignmentCollectionValueSchema, iDataObjectSchema, resolveSchema, resolveOneOfSchemas, embeddingInstanceSchema, rerankerInstanceSchema }) {
14
+
15
+ // Helper function for conditional subnode schema
16
+ function getSubnodesSchema() {
17
+ return z.object({
18
+ embedding: z.union([embeddingInstanceSchema, z.array(embeddingInstanceSchema)]),
19
+ reranker: resolveSchema({ parameters, schema: rerankerInstanceSchema, required: true, displayOptions: {"show":{"useReranker":[true]}}, defaults: {"useReranker":false} }),
20
+ }).strict();
21
+ }
22
+
23
+ return z.object({
24
+ parameters: z.object({
25
+ mode: z.literal('load'),
26
+ databricksIndex: z.union([z.object({ __rl: z.literal(true), mode: z.union([z.literal('list'), z.literal('id')]), value: z.union([z.string(), z.number()]), cachedResultName: z.string().optional(), cachedResultUrl: z.string().optional() }), expressionSchema]).optional(),
27
+ contentColumn: stringOrExpression.optional(),
28
+ options: z.object({ metadataColumns: z.array(z.string()).optional(), searchMode: z.union([z.literal('ANN'), z.literal('HYBRID'), expressionSchema]).optional(), searchFilterJson: z.union([iDataObjectSchema, z.string()]).optional() }).optional(),
29
+ prompt: stringOrExpression,
30
+ topK: numberOrExpression.optional(),
31
+ includeDocumentMetadata: booleanOrExpression.optional(),
32
+ useReranker: booleanOrExpression.optional(),
33
+ }).optional(),
34
+ subnodes: getSubnodesSchema(),
35
+ });
36
+ };
@@ -0,0 +1,92 @@
1
+ /**
2
+ * Databricks Vector Store Node - Version 1
3
+ * Discriminator: mode=load
4
+ */
5
+
6
+
7
+ interface Credentials {
8
+ databricksOAuth2Api: CredentialReference;
9
+ }
10
+
11
+ /** Get many ranked documents from vector store for query */
12
+ export type LcVectorStoreDatabricksV1LoadParams = {
13
+ /**
14
+ * 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.
15
+ * <patterns>
16
+ * <pattern title="load mode — one-shot similarity search (generic)">
17
+ * // Substitute the type literal and provider-specific parameters — see the rest of this file.
18
+ * const lookup = vectorStore({
19
+ * type: '@n8n/n8n-nodes-langchain.vectorStoreXxx',
20
+ * config: {
21
+ * name: 'Knowledge Base',
22
+ * parameters: {
23
+ * mode: 'load',
24
+ * prompt: expr('{{ $json.query }}'),
25
+ * // ...provider-specific parameters
26
+ * },
27
+ * subnodes: { embedding: embeddingsOpenAi }
28
+ * }
29
+ * });
30
+ * </pattern>
31
+ * </patterns>
32
+ */
33
+ mode: 'load';
34
+ databricksIndex?: { __rl: true; mode: 'list' | 'id'; value: string; cachedResultName?: string };
35
+ /**
36
+ * Column that becomes the document text. Leave empty on a managed-embedding index to use its embedding source column. Choose from the list, or specify an ID using an &lt;a href="https://docs.n8n.io/code/expressions/"&gt;expression&lt;/a&gt;.
37
+ * @loadOptionsMethod getIndexColumns
38
+ */
39
+ contentColumn?: string | Expression<string>;
40
+ /**
41
+ * Options
42
+ * @default {}
43
+ */
44
+ options?: {
45
+ /** Columns to return in document metadata. Defaults to all columns except the key, content and vector columns. Choose from the list, or specify IDs using an &lt;a href="https://docs.n8n.io/code/expressions/"&gt;expression&lt;/a&gt;.
46
+ * @loadOptionsMethod getIndexColumns
47
+ * @default []
48
+ */
49
+ metadataColumns?: string[];
50
+ /** Vector ranks purely by semantic similarity. Hybrid adds keyword matching on top, using the search text. Sent as query_type ANN or HYBRID.
51
+ * @default ANN
52
+ */
53
+ searchMode?: 'ANN' | 'HYBRID' | Expression<string>;
54
+ /** Restrict results to rows matching this metadata condition, for example {"source": "handbook"}. Sent as filters_json. Works on STANDARD endpoints only.
55
+ * @default {}
56
+ */
57
+ searchFilterJson?: IDataObject | string | Expression<string>;
58
+ };
59
+ /**
60
+ * Search prompt to retrieve matching documents from the vector store using similarity-based ranking
61
+ */
62
+ prompt: string | Expression<string>;
63
+ /**
64
+ * Number of top results to fetch from vector store
65
+ * @default 4
66
+ */
67
+ topK?: number | Expression<number>;
68
+ /**
69
+ * Whether or not to include document metadata
70
+ * @default true
71
+ */
72
+ includeDocumentMetadata?: boolean | Expression<boolean>;
73
+ /**
74
+ * Whether or not to rerank results
75
+ * @default false
76
+ */
77
+ useReranker?: boolean | Expression<boolean>;
78
+ };
79
+
80
+ export interface LcVectorStoreDatabricksV1LoadSubnodeConfig {
81
+ embedding: EmbeddingInstance | EmbeddingInstance[];
82
+ /**
83
+ * @displayOptions.show { useReranker: [true] }
84
+ */
85
+ reranker: RerankerInstance;
86
+ }
87
+
88
+ export type LcVectorStoreDatabricksV1LoadNode = {
89
+ type: '@n8n/n8n-nodes-langchain.vectorStoreDatabricks';
90
+ version: 1;
91
+ config: NodeConfig<LcVectorStoreDatabricksV1LoadParams> & { credentials?: Credentials } & { subnodes: LcVectorStoreDatabricksV1LoadSubnodeConfig };
92
+ };
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Databricks Vector Store Node - Version 1 - Zod Schema
3
+ * Discriminator: mode=retrieve
4
+ *
5
+ * Use .parse() for strict validation or .safeParse() for error handling.
6
+ *
7
+ * Schema helpers (z, expressionSchema, etc.) are passed as parameters
8
+ * by the schema-validator, not imported from external files.
9
+ *
10
+ * @generated - CommonJS JavaScript for runtime loading
11
+ */
12
+
13
+ module.exports = function getSchema({ parameters, z, expressionSchema, stringOrExpression, numberOrExpression, booleanOrExpression, resourceLocatorValueSchema, resourceMapperValueSchema, filterValueSchema, assignmentCollectionValueSchema, iDataObjectSchema, resolveSchema, resolveOneOfSchemas, embeddingInstanceSchema, rerankerInstanceSchema }) {
14
+
15
+ // Helper function for conditional subnode schema
16
+ function getSubnodesSchema() {
17
+ return z.object({
18
+ embedding: z.union([embeddingInstanceSchema, z.array(embeddingInstanceSchema)]),
19
+ reranker: resolveSchema({ parameters, schema: rerankerInstanceSchema, required: true, displayOptions: {"show":{"useReranker":[true]}}, defaults: {"useReranker":false} }),
20
+ }).strict();
21
+ }
22
+
23
+ return z.object({
24
+ parameters: z.object({
25
+ mode: z.literal('retrieve').default('retrieve'),
26
+ databricksIndex: z.union([z.object({ __rl: z.literal(true), mode: z.union([z.literal('list'), z.literal('id')]), value: z.union([z.string(), z.number()]), cachedResultName: z.string().optional(), cachedResultUrl: z.string().optional() }), expressionSchema]).optional(),
27
+ contentColumn: stringOrExpression.optional(),
28
+ options: z.object({ metadataColumns: z.array(z.string()).optional(), searchMode: z.union([z.literal('ANN'), z.literal('HYBRID'), expressionSchema]).optional(), searchFilterJson: z.union([iDataObjectSchema, z.string()]).optional() }).optional(),
29
+ useReranker: booleanOrExpression.optional(),
30
+ }).optional(),
31
+ subnodes: getSubnodesSchema(),
32
+ });
33
+ };
@@ -0,0 +1,83 @@
1
+ /**
2
+ * Databricks Vector Store Node - Version 1
3
+ * Discriminator: mode=retrieve
4
+ */
5
+
6
+
7
+ interface Credentials {
8
+ databricksOAuth2Api: CredentialReference;
9
+ }
10
+
11
+ /** Retrieve documents from vector store to be used as vector store with AI nodes */
12
+ export type LcVectorStoreDatabricksV1RetrieveParams = {
13
+ /**
14
+ * 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'`.
15
+ * <patterns>
16
+ * <pattern title="retrieve mode — feed another node as a subnode (generic)">
17
+ * // Substitute the type literal and provider-specific parameters — see the rest of this file.
18
+ * const store = vectorStore({
19
+ * type: '@n8n/n8n-nodes-langchain.vectorStoreXxx',
20
+ * config: {
21
+ * name: 'Knowledge Base',
22
+ * parameters: { mode: 'retrieve' /* + provider-specific parameters *\/ },
23
+ * subnodes: { embedding: embeddingsOpenAi }
24
+ * }
25
+ * });
26
+ *
27
+ * const retrieverTool = tool({
28
+ * type: '@n8n/n8n-nodes-langchain.toolVectorStore',
29
+ * config: {
30
+ * name: 'KB Retriever',
31
+ * parameters: { description: 'Search the product knowledge base' },
32
+ * subnodes: { vectorStore: store, model: openAiModel }
33
+ * }
34
+ * });
35
+ * </pattern>
36
+ * </patterns>
37
+ */
38
+ mode: 'retrieve';
39
+ databricksIndex?: { __rl: true; mode: 'list' | 'id'; value: string; cachedResultName?: string };
40
+ /**
41
+ * Column that becomes the document text. Leave empty on a managed-embedding index to use its embedding source column. Choose from the list, or specify an ID using an &lt;a href="https://docs.n8n.io/code/expressions/"&gt;expression&lt;/a&gt;.
42
+ * @loadOptionsMethod getIndexColumns
43
+ */
44
+ contentColumn?: string | Expression<string>;
45
+ /**
46
+ * Options
47
+ * @default {}
48
+ */
49
+ options?: {
50
+ /** Columns to return in document metadata. Defaults to all columns except the key, content and vector columns. Choose from the list, or specify IDs using an &lt;a href="https://docs.n8n.io/code/expressions/"&gt;expression&lt;/a&gt;.
51
+ * @loadOptionsMethod getIndexColumns
52
+ * @default []
53
+ */
54
+ metadataColumns?: string[];
55
+ /** Vector ranks purely by semantic similarity. Hybrid adds keyword matching on top, using the search text. Sent as query_type ANN or HYBRID.
56
+ * @default ANN
57
+ */
58
+ searchMode?: 'ANN' | 'HYBRID' | Expression<string>;
59
+ /** Restrict results to rows matching this metadata condition, for example {"source": "handbook"}. Sent as filters_json. Works on STANDARD endpoints only.
60
+ * @default {}
61
+ */
62
+ searchFilterJson?: IDataObject | string | Expression<string>;
63
+ };
64
+ /**
65
+ * Whether or not to rerank results
66
+ * @default false
67
+ */
68
+ useReranker?: boolean | Expression<boolean>;
69
+ };
70
+
71
+ export interface LcVectorStoreDatabricksV1RetrieveSubnodeConfig {
72
+ embedding: EmbeddingInstance | EmbeddingInstance[];
73
+ /**
74
+ * @displayOptions.show { useReranker: [true] }
75
+ */
76
+ reranker: RerankerInstance;
77
+ }
78
+
79
+ export type LcVectorStoreDatabricksV1RetrieveNode = {
80
+ type: '@n8n/n8n-nodes-langchain.vectorStoreDatabricks';
81
+ version: 1;
82
+ config: NodeConfig<LcVectorStoreDatabricksV1RetrieveParams> & { credentials?: Credentials } & { subnodes: LcVectorStoreDatabricksV1RetrieveSubnodeConfig };
83
+ };
@@ -0,0 +1,37 @@
1
+ /**
2
+ * Databricks Vector Store Node - Version 1 - Zod Schema
3
+ * Discriminator: mode=retrieve-as-tool
4
+ *
5
+ * Use .parse() for strict validation or .safeParse() for error handling.
6
+ *
7
+ * Schema helpers (z, expressionSchema, etc.) are passed as parameters
8
+ * by the schema-validator, not imported from external files.
9
+ *
10
+ * @generated - CommonJS JavaScript for runtime loading
11
+ */
12
+
13
+ module.exports = function getSchema({ parameters, z, expressionSchema, stringOrExpression, numberOrExpression, booleanOrExpression, resourceLocatorValueSchema, resourceMapperValueSchema, filterValueSchema, assignmentCollectionValueSchema, iDataObjectSchema, resolveSchema, resolveOneOfSchemas, embeddingInstanceSchema, rerankerInstanceSchema }) {
14
+
15
+ // Helper function for conditional subnode schema
16
+ function getSubnodesSchema() {
17
+ return z.object({
18
+ embedding: z.union([embeddingInstanceSchema, z.array(embeddingInstanceSchema)]),
19
+ reranker: resolveSchema({ parameters, schema: rerankerInstanceSchema, required: true, displayOptions: {"show":{"useReranker":[true]}}, defaults: {"useReranker":false} }),
20
+ }).strict();
21
+ }
22
+
23
+ return z.object({
24
+ parameters: z.object({
25
+ mode: z.literal('retrieve-as-tool'),
26
+ toolName: stringOrExpression,
27
+ toolDescription: stringOrExpression,
28
+ databricksIndex: z.union([z.object({ __rl: z.literal(true), mode: z.union([z.literal('list'), z.literal('id')]), value: z.union([z.string(), z.number()]), cachedResultName: z.string().optional(), cachedResultUrl: z.string().optional() }), expressionSchema]).optional(),
29
+ contentColumn: stringOrExpression.optional(),
30
+ options: z.object({ metadataColumns: z.array(z.string()).optional(), searchMode: z.union([z.literal('ANN'), z.literal('HYBRID'), expressionSchema]).optional(), searchFilterJson: z.union([iDataObjectSchema, z.string()]).optional() }).optional(),
31
+ topK: numberOrExpression.optional(),
32
+ includeDocumentMetadata: booleanOrExpression.optional(),
33
+ useReranker: booleanOrExpression.optional(),
34
+ }).optional(),
35
+ subnodes: getSubnodesSchema(),
36
+ });
37
+ };
@@ -0,0 +1,106 @@
1
+ /**
2
+ * Databricks Vector Store Node - Version 1
3
+ * Discriminator: mode=retrieve-as-tool
4
+ */
5
+
6
+
7
+ interface Credentials {
8
+ databricksOAuth2Api: CredentialReference;
9
+ }
10
+
11
+ /** Retrieve documents from vector store to be used as tool with AI nodes */
12
+ export type LcVectorStoreDatabricksV1RetrieveAsToolParams = {
13
+ /**
14
+ * 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.
15
+ * <patterns>
16
+ * <pattern title="retrieve-as-tool mode — RAG via AI Agent (generic, works for any vectorStore* node)">
17
+ * // Substitute the type literal and provider-specific parameters — see the rest of this file
18
+ * // for the exact shape (e.g. pineconeIndex, qdrantCollection, supabaseTableName).
19
+ * const knowledgeBase = tool({
20
+ * type: '@n8n/n8n-nodes-langchain.vectorStoreXxx',
21
+ * config: {
22
+ * name: 'Knowledge Base',
23
+ * parameters: {
24
+ * mode: 'retrieve-as-tool',
25
+ * toolDescription: 'Search the product knowledge base',
26
+ * // ...provider-specific parameters
27
+ * },
28
+ * subnodes: { embedding: embeddingsOpenAi }
29
+ * }
30
+ * });
31
+ *
32
+ * const agent = node({
33
+ * type: '@n8n/n8n-nodes-langchain.agent',
34
+ * config: {
35
+ * name: 'Support Agent',
36
+ * parameters: { promptType: 'define', text: expr('{{ $json.question }}') },
37
+ * subnodes: { model: openAiModel, tools: [knowledgeBase] }
38
+ * }
39
+ * });
40
+ * </pattern>
41
+ * </patterns>
42
+ */
43
+ mode: 'retrieve-as-tool';
44
+ /**
45
+ * Name of the vector store
46
+ */
47
+ toolName: string | Expression<string>;
48
+ /**
49
+ * Explain to the LLM what this tool does, a good, specific description would allow LLMs to produce expected results much more often
50
+ */
51
+ toolDescription: string | Expression<string>;
52
+ databricksIndex?: { __rl: true; mode: 'list' | 'id'; value: string; cachedResultName?: string };
53
+ /**
54
+ * Column that becomes the document text. Leave empty on a managed-embedding index to use its embedding source column. Choose from the list, or specify an ID using an &lt;a href="https://docs.n8n.io/code/expressions/"&gt;expression&lt;/a&gt;.
55
+ * @loadOptionsMethod getIndexColumns
56
+ */
57
+ contentColumn?: string | Expression<string>;
58
+ /**
59
+ * Options
60
+ * @default {}
61
+ */
62
+ options?: {
63
+ /** Columns to return in document metadata. Defaults to all columns except the key, content and vector columns. Choose from the list, or specify IDs using an &lt;a href="https://docs.n8n.io/code/expressions/"&gt;expression&lt;/a&gt;.
64
+ * @loadOptionsMethod getIndexColumns
65
+ * @default []
66
+ */
67
+ metadataColumns?: string[];
68
+ /** Vector ranks purely by semantic similarity. Hybrid adds keyword matching on top, using the search text. Sent as query_type ANN or HYBRID.
69
+ * @default ANN
70
+ */
71
+ searchMode?: 'ANN' | 'HYBRID' | Expression<string>;
72
+ /** Restrict results to rows matching this metadata condition, for example {"source": "handbook"}. Sent as filters_json. Works on STANDARD endpoints only.
73
+ * @default {}
74
+ */
75
+ searchFilterJson?: IDataObject | string | Expression<string>;
76
+ };
77
+ /**
78
+ * Number of top results to fetch from vector store
79
+ * @default 4
80
+ */
81
+ topK?: number | Expression<number>;
82
+ /**
83
+ * Whether or not to include document metadata
84
+ * @default true
85
+ */
86
+ includeDocumentMetadata?: boolean | Expression<boolean>;
87
+ /**
88
+ * Whether or not to rerank results
89
+ * @default false
90
+ */
91
+ useReranker?: boolean | Expression<boolean>;
92
+ };
93
+
94
+ export interface LcVectorStoreDatabricksV1RetrieveAsToolSubnodeConfig {
95
+ embedding: EmbeddingInstance | EmbeddingInstance[];
96
+ /**
97
+ * @displayOptions.show { useReranker: [true] }
98
+ */
99
+ reranker: RerankerInstance;
100
+ }
101
+
102
+ export type LcVectorStoreDatabricksV1RetrieveAsToolNode = {
103
+ type: '@n8n/n8n-nodes-langchain.vectorStoreDatabricks';
104
+ version: 1;
105
+ config: NodeConfig<LcVectorStoreDatabricksV1RetrieveAsToolParams> & { credentials?: Credentials } & { subnodes: LcVectorStoreDatabricksV1RetrieveAsToolSubnodeConfig };
106
+ };