@n8n/n8n-nodes-langchain 1.89.0 → 1.91.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 (49) hide show
  1. package/dist/credentials/OpenRouterApi.credentials.js +1 -1
  2. package/dist/credentials/OpenRouterApi.credentials.js.map +1 -1
  3. package/dist/nodes/agents/Agent/agents/ToolsAgent/execute.js +5 -1
  4. package/dist/nodes/agents/Agent/agents/ToolsAgent/execute.js.map +1 -1
  5. package/dist/nodes/chains/TextClassifier/TextClassifier.node.js +14 -0
  6. package/dist/nodes/chains/TextClassifier/TextClassifier.node.js.map +1 -1
  7. package/dist/nodes/llms/LMChatOpenAi/methods/loadModels.js +5 -5
  8. package/dist/nodes/llms/LMChatOpenAi/methods/loadModels.js.map +1 -1
  9. package/dist/nodes/mcp/McpTrigger/McpServer.js +2 -1
  10. package/dist/nodes/mcp/McpTrigger/McpServer.js.map +1 -1
  11. package/dist/nodes/memory/MemoryBufferWindow/MemoryBufferWindow.node.js +2 -1
  12. package/dist/nodes/memory/MemoryBufferWindow/MemoryBufferWindow.node.js.map +1 -1
  13. package/dist/nodes/memory/MemoryMongoDbChat/MemoryMongoDbChat.node.js +2 -1
  14. package/dist/nodes/memory/MemoryMongoDbChat/MemoryMongoDbChat.node.js.map +1 -1
  15. package/dist/nodes/memory/MemoryMotorhead/MemoryMotorhead.node.js +2 -1
  16. package/dist/nodes/memory/MemoryMotorhead/MemoryMotorhead.node.js.map +1 -1
  17. package/dist/nodes/memory/MemoryPostgresChat/MemoryPostgresChat.node.js +2 -1
  18. package/dist/nodes/memory/MemoryPostgresChat/MemoryPostgresChat.node.js.map +1 -1
  19. package/dist/nodes/memory/MemoryRedisChat/MemoryRedisChat.node.js +2 -1
  20. package/dist/nodes/memory/MemoryRedisChat/MemoryRedisChat.node.js.map +1 -1
  21. package/dist/nodes/memory/MemoryXata/MemoryXata.node.js +2 -1
  22. package/dist/nodes/memory/MemoryXata/MemoryXata.node.js.map +1 -1
  23. package/dist/nodes/memory/MemoryZep/MemoryZep.node.js +2 -1
  24. package/dist/nodes/memory/MemoryZep/MemoryZep.node.js.map +1 -1
  25. package/dist/nodes/tools/ToolCode/ToolCode.node.js +5 -3
  26. package/dist/nodes/tools/ToolCode/ToolCode.node.js.map +1 -1
  27. package/dist/nodes/tools/ToolHttpRequest/ToolHttpRequest.node.js +2 -0
  28. package/dist/nodes/tools/ToolHttpRequest/ToolHttpRequest.node.js.map +1 -1
  29. package/dist/nodes/tools/ToolVectorStore/ToolVectorStore.node.js +11 -3
  30. package/dist/nodes/tools/ToolVectorStore/ToolVectorStore.node.js.map +1 -1
  31. package/dist/nodes/tools/ToolWorkflow/ToolWorkflow.node.js +3 -2
  32. package/dist/nodes/tools/ToolWorkflow/ToolWorkflow.node.js.map +1 -1
  33. package/dist/nodes/tools/ToolWorkflow/v2/ToolWorkflowV2.node.js +5 -2
  34. package/dist/nodes/tools/ToolWorkflow/v2/ToolWorkflowV2.node.js.map +1 -1
  35. package/dist/nodes/tools/ToolWorkflow/v2/methods/localResourceMapping.js +3 -1
  36. package/dist/nodes/tools/ToolWorkflow/v2/methods/localResourceMapping.js.map +1 -1
  37. package/dist/nodes/tools/ToolWorkflow/v2/versionDescription.js +7 -2
  38. package/dist/nodes/tools/ToolWorkflow/v2/versionDescription.js.map +1 -1
  39. package/dist/nodes/vendors/OpenAi/actions/image/generate.operation.js +64 -4
  40. package/dist/nodes/vendors/OpenAi/actions/image/generate.operation.js.map +1 -1
  41. package/dist/nodes/vendors/OpenAi/methods/listSearch.js +1 -1
  42. package/dist/nodes/vendors/OpenAi/methods/listSearch.js.map +1 -1
  43. package/dist/types/credentials.json +1 -1
  44. package/dist/types/nodes.json +13 -13
  45. package/dist/utils/helpers.js +5 -0
  46. package/dist/utils/helpers.js.map +1 -1
  47. package/dist/utils/logWrapper.js +2 -1
  48. package/dist/utils/logWrapper.js.map +1 -1
  49. package/package.json +8 -8
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../nodes/tools/ToolWorkflow/v2/versionDescription.ts"],"sourcesContent":["/* eslint-disable n8n-nodes-base/node-filename-against-convention */\n/* eslint-disable n8n-nodes-base/node-dirname-against-convention */\nimport { NodeConnectionTypes, type INodeTypeDescription } from 'n8n-workflow';\n\nimport { getConnectionHintNoticeField } from '../../../../utils/sharedFields';\n\nexport const versionDescription: INodeTypeDescription = {\n\tdisplayName: 'Call n8n Workflow Tool',\n\tname: 'toolWorkflow',\n\tgroup: ['transform'],\n\tdescription: 'Uses another n8n workflow as a tool. Allows packaging any n8n node(s) as a tool.',\n\tdefaults: {\n\t\tname: 'Call n8n Workflow Tool',\n\t},\n\tversion: [2, 2.1],\n\tinputs: [],\n\toutputs: [NodeConnectionTypes.AiTool],\n\toutputNames: ['Tool'],\n\tproperties: [\n\t\tgetConnectionHintNoticeField([NodeConnectionTypes.AiAgent]),\n\t\t{\n\t\t\tdisplayName:\n\t\t\t\t'See an example of a workflow to suggest meeting slots using AI <a href=\"/templates/1953\" target=\"_blank\">here</a>.',\n\t\t\tname: 'noticeTemplateExample',\n\t\t\ttype: 'notice',\n\t\t\tdefault: '',\n\t\t},\n\t\t{\n\t\t\tdisplayName: 'Name',\n\t\t\tname: 'name',\n\t\t\ttype: 'string',\n\t\t\tdefault: '',\n\t\t\tplaceholder: 'e.g. My_Color_Tool',\n\t\t\tvalidateType: 'string-alphanumeric',\n\t\t\tdescription:\n\t\t\t\t'The name of the function to be called, could contain letters, numbers, and underscores only',\n\t\t},\n\t\t{\n\t\t\tdisplayName: 'Description',\n\t\t\tname: 'description',\n\t\t\ttype: 'string',\n\t\t\tdefault: '',\n\t\t\tplaceholder:\n\t\t\t\t'Call this tool to get a random color. The input should be a string with comma separated names of colors to exclude.',\n\t\t\ttypeOptions: {\n\t\t\t\trows: 3,\n\t\t\t},\n\t\t},\n\n\t\t{\n\t\t\tdisplayName:\n\t\t\t\t'This tool will call the workflow you define below, and look in the last node for the response. The workflow needs to start with an Execute Workflow trigger',\n\t\t\tname: 'executeNotice',\n\t\t\ttype: 'notice',\n\t\t\tdefault: '',\n\t\t},\n\n\t\t{\n\t\t\tdisplayName: 'Source',\n\t\t\tname: 'source',\n\t\t\ttype: 'options',\n\t\t\toptions: [\n\t\t\t\t{\n\t\t\t\t\tname: 'Database',\n\t\t\t\t\tvalue: 'database',\n\t\t\t\t\tdescription: 'Load the workflow from the database by ID',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tname: 'Define Below',\n\t\t\t\t\tvalue: 'parameter',\n\t\t\t\t\tdescription: 'Pass the JSON code of a workflow',\n\t\t\t\t},\n\t\t\t],\n\t\t\tdefault: 'database',\n\t\t\tdescription: 'Where to get the workflow to execute from',\n\t\t},\n\n\t\t// ----------------------------------\n\t\t// source:database\n\t\t// ----------------------------------\n\t\t{\n\t\t\tdisplayName: 'Workflow',\n\t\t\tname: 'workflowId',\n\t\t\ttype: 'workflowSelector',\n\t\t\tdisplayOptions: {\n\t\t\t\tshow: {\n\t\t\t\t\tsource: ['database'],\n\t\t\t\t},\n\t\t\t},\n\t\t\tdefault: '',\n\t\t\trequired: true,\n\t\t},\n\t\t// -----------------------------------------------\n\t\t// Resource mapper for workflow inputs\n\t\t// -----------------------------------------------\n\t\t{\n\t\t\tdisplayName: 'Workflow Inputs',\n\t\t\tname: 'workflowInputs',\n\t\t\ttype: 'resourceMapper',\n\t\t\tnoDataExpression: true,\n\t\t\tdefault: {\n\t\t\t\tmappingMode: 'defineBelow',\n\t\t\t\tvalue: null,\n\t\t\t},\n\t\t\trequired: true,\n\t\t\ttypeOptions: {\n\t\t\t\tloadOptionsDependsOn: ['workflowId.value'],\n\t\t\t\tresourceMapper: {\n\t\t\t\t\tlocalResourceMapperMethod: 'loadSubWorkflowInputs',\n\t\t\t\t\tvaluesLabel: 'Workflow Inputs',\n\t\t\t\t\tmode: 'map',\n\t\t\t\t\tfieldWords: {\n\t\t\t\t\t\tsingular: 'workflow input',\n\t\t\t\t\t\tplural: 'workflow inputs',\n\t\t\t\t\t},\n\t\t\t\t\taddAllFields: true,\n\t\t\t\t\tmultiKeyMatch: false,\n\t\t\t\t\tsupportAutoMap: false,\n\t\t\t\t},\n\t\t\t},\n\t\t\tdisplayOptions: {\n\t\t\t\tshow: {\n\t\t\t\t\tsource: ['database'],\n\t\t\t\t},\n\t\t\t\thide: {\n\t\t\t\t\tworkflowId: [''],\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\t// ----------------------------------\n\t\t// source:parameter\n\t\t// ----------------------------------\n\t\t{\n\t\t\tdisplayName: 'Workflow JSON',\n\t\t\tname: 'workflowJson',\n\t\t\ttype: 'json',\n\t\t\ttypeOptions: {\n\t\t\t\trows: 10,\n\t\t\t},\n\t\t\tdisplayOptions: {\n\t\t\t\tshow: {\n\t\t\t\t\tsource: ['parameter'],\n\t\t\t\t},\n\t\t\t},\n\t\t\tdefault: '\\n\\n\\n\\n\\n\\n\\n\\n\\n',\n\t\t\trequired: true,\n\t\t\tdescription: 'The workflow JSON code to execute',\n\t\t},\n\t],\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,0BAA+D;AAE/D,0BAA6C;AAEtC,MAAM,qBAA2C;AAAA,EACvD,aAAa;AAAA,EACb,MAAM;AAAA,EACN,OAAO,CAAC,WAAW;AAAA,EACnB,aAAa;AAAA,EACb,UAAU;AAAA,IACT,MAAM;AAAA,EACP;AAAA,EACA,SAAS,CAAC,GAAG,GAAG;AAAA,EAChB,QAAQ,CAAC;AAAA,EACT,SAAS,CAAC,wCAAoB,MAAM;AAAA,EACpC,aAAa,CAAC,MAAM;AAAA,EACpB,YAAY;AAAA,QACX,kDAA6B,CAAC,wCAAoB,OAAO,CAAC;AAAA,IAC1D;AAAA,MACC,aACC;AAAA,MACD,MAAM;AAAA,MACN,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA,IACA;AAAA,MACC,aAAa;AAAA,MACb,MAAM;AAAA,MACN,MAAM;AA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AA,QACjB;AAAA,MACD;AAAA,MACA,gBAAgB;AAAA,QACf,MAAM;AAAA,UACL,QAAQ,CAAC,UAAU;AAAA,QACpB;AAAA,QACA,MAAM;AAAA,UACL,YAAY,CAAC,EAAE;AAAA,QAChB;AAAA,MACD;AAAA,IACD;AAAA;AAAA;AAAA;AAAA,IAIA;AAAA,MACC,aAAa;AAAA,MACb,MAAM;AAAA,MACN,MAAM;AAAA,MACN,aAAa;AAAA,QACZ,MAAM;AAAA,MACP;AAAA,MACA,gBAAgB;AAAA,QACf,MAAM;AAAA,UACL,QAAQ,CAAC,WAAW;AAAA,QACrB;AAAA,MACD;AAAA,MACA,SAAS;AAAA,MACT,UAAU;AAAA,MACV,aAAa;AAAA,IACd;AAAA,EACD;AACD;","names":[]}
1
+ {"version":3,"sources":["../../../../../nodes/tools/ToolWorkflow/v2/versionDescription.ts"],"sourcesContent":["/* eslint-disable n8n-nodes-base/node-filename-against-convention */\n/* eslint-disable n8n-nodes-base/node-dirname-against-convention */\nimport { NodeConnectionTypes, type INodeTypeDescription } from 'n8n-workflow';\n\nimport { getConnectionHintNoticeField } from '../../../../utils/sharedFields';\n\nexport const versionDescription: INodeTypeDescription = {\n\tdisplayName: 'Call n8n Workflow Tool',\n\tname: 'toolWorkflow',\n\tgroup: ['transform'],\n\tdescription: 'Uses another n8n workflow as a tool. Allows packaging any n8n node(s) as a tool.',\n\tdefaults: {\n\t\tname: 'Call n8n Workflow Tool',\n\t},\n\tversion: [2, 2.1, 2.2],\n\tinputs: [],\n\toutputs: [NodeConnectionTypes.AiTool],\n\toutputNames: ['Tool'],\n\tproperties: [\n\t\tgetConnectionHintNoticeField([NodeConnectionTypes.AiAgent]),\n\t\t{\n\t\t\tdisplayName:\n\t\t\t\t'See an example of a workflow to suggest meeting slots using AI <a href=\"/templates/1953\" target=\"_blank\">here</a>.',\n\t\t\tname: 'noticeTemplateExample',\n\t\t\ttype: 'notice',\n\t\t\tdefault: '',\n\t\t},\n\t\t{\n\t\t\tdisplayName: 'Name',\n\t\t\tname: 'name',\n\t\t\ttype: 'string',\n\t\t\tdefault: '',\n\t\t\tplaceholder: 'e.g. My_Color_Tool',\n\t\t\tvalidateType: 'string-alphanumeric',\n\t\t\tdescription:\n\t\t\t\t'The name of the function to be called, could contain letters, numbers, and underscores only',\n\t\t\tdisplayOptions: {\n\t\t\t\tshow: {\n\t\t\t\t\t'@version': [{ _cnd: { lte: 2.1 } }],\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tdisplayName: 'Description',\n\t\t\tname: 'description',\n\t\t\ttype: 'string',\n\t\t\tdefault: '',\n\t\t\tplaceholder:\n\t\t\t\t'Call this tool to get a random color. The input should be a string with comma separated names of colors to exclude.',\n\t\t\ttypeOptions: {\n\t\t\t\trows: 3,\n\t\t\t},\n\t\t},\n\n\t\t{\n\t\t\tdisplayName:\n\t\t\t\t'This tool will call the workflow you define below, and look in the last node for the response. The workflow needs to start with an Execute Workflow trigger',\n\t\t\tname: 'executeNotice',\n\t\t\ttype: 'notice',\n\t\t\tdefault: '',\n\t\t},\n\n\t\t{\n\t\t\tdisplayName: 'Source',\n\t\t\tname: 'source',\n\t\t\ttype: 'options',\n\t\t\toptions: [\n\t\t\t\t{\n\t\t\t\t\tname: 'Database',\n\t\t\t\t\tvalue: 'database',\n\t\t\t\t\tdescription: 'Load the workflow from the database by ID',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tname: 'Define Below',\n\t\t\t\t\tvalue: 'parameter',\n\t\t\t\t\tdescription: 'Pass the JSON code of a workflow',\n\t\t\t\t},\n\t\t\t],\n\t\t\tdefault: 'database',\n\t\t\tdescription: 'Where to get the workflow to execute from',\n\t\t},\n\n\t\t// ----------------------------------\n\t\t// source:database\n\t\t// ----------------------------------\n\t\t{\n\t\t\tdisplayName: 'Workflow',\n\t\t\tname: 'workflowId',\n\t\t\ttype: 'workflowSelector',\n\t\t\tdisplayOptions: {\n\t\t\t\tshow: {\n\t\t\t\t\tsource: ['database'],\n\t\t\t\t},\n\t\t\t},\n\t\t\tdefault: '',\n\t\t\trequired: true,\n\t\t},\n\t\t// -----------------------------------------------\n\t\t// Resource mapper for workflow inputs\n\t\t// -----------------------------------------------\n\t\t{\n\t\t\tdisplayName: 'Workflow Inputs',\n\t\t\tname: 'workflowInputs',\n\t\t\ttype: 'resourceMapper',\n\t\t\tnoDataExpression: true,\n\t\t\tdefault: {\n\t\t\t\tmappingMode: 'defineBelow',\n\t\t\t\tvalue: null,\n\t\t\t},\n\t\t\trequired: true,\n\t\t\ttypeOptions: {\n\t\t\t\tloadOptionsDependsOn: ['workflowId.value'],\n\t\t\t\tresourceMapper: {\n\t\t\t\t\tlocalResourceMapperMethod: 'loadSubWorkflowInputs',\n\t\t\t\t\tvaluesLabel: 'Workflow Inputs',\n\t\t\t\t\tmode: 'map',\n\t\t\t\t\tfieldWords: {\n\t\t\t\t\t\tsingular: 'workflow input',\n\t\t\t\t\t\tplural: 'workflow inputs',\n\t\t\t\t\t},\n\t\t\t\t\taddAllFields: true,\n\t\t\t\t\tmultiKeyMatch: false,\n\t\t\t\t\tsupportAutoMap: false,\n\t\t\t\t},\n\t\t\t},\n\t\t\tdisplayOptions: {\n\t\t\t\tshow: {\n\t\t\t\t\tsource: ['database'],\n\t\t\t\t},\n\t\t\t\thide: {\n\t\t\t\t\tworkflowId: [''],\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\t// ----------------------------------\n\t\t// source:parameter\n\t\t// ----------------------------------\n\t\t{\n\t\t\tdisplayName: 'Workflow JSON',\n\t\t\tname: 'workflowJson',\n\t\t\ttype: 'json',\n\t\t\ttypeOptions: {\n\t\t\t\trows: 10,\n\t\t\t},\n\t\t\tdisplayOptions: {\n\t\t\t\tshow: {\n\t\t\t\t\tsource: ['parameter'],\n\t\t\t\t},\n\t\t\t},\n\t\t\tdefault: '\\n\\n\\n\\n\\n\\n\\n\\n\\n',\n\t\t\trequired: true,\n\t\t\tdescription: 'The workflow JSON code to execute',\n\t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[
33
33
  description: "The model to use for image generation",
34
34
  options: [
35
35
  {
36
- name: "DALL-E-2",
36
+ name: "DALL\xB7E 2",
37
37
  value: "dall-e-2"
38
38
  },
39
39
  {
40
- name: "DALL-E-3",
40
+ name: "DALL\xB7E 3",
41
41
  value: "dall-e-3"
42
+ },
43
+ {
44
+ name: "GPT Image 1",
45
+ value: "gpt-image-1"
42
46
  }
43
47
  ]
44
48
  },
@@ -78,7 +82,7 @@ const properties = [
78
82
  },
79
83
  {
80
84
  displayName: "Quality",
81
- name: "quality",
85
+ name: "dalleQuality",
82
86
  type: "options",
83
87
  description: "The quality of the image that will be generated, HD creates images with finer details and greater consistency across the image",
84
88
  options: [
@@ -98,6 +102,32 @@ const properties = [
98
102
  },
99
103
  default: "standard"
100
104
  },
105
+ {
106
+ displayName: "Quality",
107
+ name: "quality",
108
+ type: "options",
109
+ description: "The quality of the image that will be generated, High creates images with finer details and greater consistency across the image",
110
+ options: [
111
+ {
112
+ name: "High",
113
+ value: "high"
114
+ },
115
+ {
116
+ name: "Medium",
117
+ value: "medium"
118
+ },
119
+ {
120
+ name: "Low",
121
+ value: "low"
122
+ }
123
+ ],
124
+ displayOptions: {
125
+ show: {
126
+ "/model": ["gpt-image-1"]
127
+ }
128
+ },
129
+ default: "medium"
130
+ },
101
131
  {
102
132
  displayName: "Resolution",
103
133
  name: "size",
@@ -148,6 +178,31 @@ const properties = [
148
178
  },
149
179
  default: "1024x1024"
150
180
  },
181
+ {
182
+ displayName: "Resolution",
183
+ name: "size",
184
+ type: "options",
185
+ options: [
186
+ {
187
+ name: "1024x1024",
188
+ value: "1024x1024"
189
+ },
190
+ {
191
+ name: "1024x1536",
192
+ value: "1024x1536"
193
+ },
194
+ {
195
+ name: "1536x1024",
196
+ value: "1536x1024"
197
+ }
198
+ ],
199
+ displayOptions: {
200
+ show: {
201
+ "/model": ["gpt-image-1"]
202
+ }
203
+ },
204
+ default: "1024x1024"
205
+ },
151
206
  {
152
207
  displayName: "Style",
153
208
  name: "style",
@@ -213,11 +268,16 @@ async function execute(i) {
213
268
  binaryPropertyOutput = options.binaryPropertyOutput;
214
269
  delete options.binaryPropertyOutput;
215
270
  }
271
+ if (options.dalleQuality) {
272
+ options.quality = options.dalleQuality;
273
+ delete options.dalleQuality;
274
+ }
216
275
  delete options.returnImageUrls;
217
276
  const body = {
218
277
  prompt,
219
278
  model,
220
- response_format,
279
+ response_format: model !== "gpt-image-1" ? response_format : void 0,
280
+ // gpt-image-1 does not support response_format
221
281
  ...options
222
282
  };
223
283
  const { data } = await import_transport.apiRequest.call(this, "POST", "/images/generations", { body });
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../nodes/vendors/OpenAi/actions/image/generate.operation.ts"],"sourcesContent":["import type {\n\tINodeProperties,\n\tIExecuteFunctions,\n\tINodeExecutionData,\n\tIDataObject,\n} from 'n8n-workflow';\nimport { updateDisplayOptions } from 'n8n-workflow';\n\nimport { apiRequest } from '../../transport';\n\nconst properties: INodeProperties[] = [\n\t{\n\t\tdisplayName: 'Model',\n\t\tname: 'model',\n\t\ttype: 'options',\n\t\tdefault: 'dall-e-3',\n\t\tdescription: 'The model to use for image generation',\n\t\toptions: [\n\t\t\t{\n\t\t\t\tname: 'DALL-E-2',\n\t\t\t\tvalue: 'dall-e-2',\n\t\t\t},\n\t\t\t{\n\t\t\t\tname: 'DALL-E-3',\n\t\t\t\tvalue: 'dall-e-3',\n\t\t\t},\n\t\t],\n\t},\n\t{\n\t\tdisplayName: 'Prompt',\n\t\tname: 'prompt',\n\t\ttype: 'string',\n\t\tplaceholder: 'e.g. A cute cat eating a dinosaur',\n\t\tdescription:\n\t\t\t'A text description of the desired image(s). The maximum length is 1000 characters for dall-e-2 and 4000 characters for dall-e-3.',\n\t\tdefault: '',\n\t\ttypeOptions: {\n\t\t\trows: 2,\n\t\t},\n\t},\n\t{\n\t\tdisplayName: 'Options',\n\t\tname: 'options',\n\t\tplaceholder: 'Add Option',\n\t\ttype: 'collection',\n\t\tdefault: {},\n\t\toptions: [\n\t\t\t{\n\t\t\t\tdisplayName: 'Number of Images',\n\t\t\t\tname: 'n',\n\t\t\t\tdefault: 1,\n\t\t\t\tdescription: 'Number of images to generate',\n\t\t\t\ttype: 'number',\n\t\t\t\ttypeOptions: {\n\t\t\t\t\tminValue: 1,\n\t\t\t\t\tmaxValue: 10,\n\t\t\t\t},\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\t'/model': ['dall-e-2'],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Quality',\n\t\t\t\tname: 'quality',\n\t\t\t\ttype: 'options',\n\t\t\t\tdescription:\n\t\t\t\t\t'The quality of the image that will be generated, HD creates images with finer details and greater consistency across the image',\n\t\t\t\toptions: [\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'HD',\n\t\t\t\t\t\tvalue: 'hd',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'Standard',\n\t\t\t\t\t\tvalue: 'standard',\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\t'/model': ['dall-e-3'],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tdefault: 'standard',\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Resolution',\n\t\t\t\tname: 'size',\n\t\t\t\ttype: 'options',\n\t\t\t\toptions: [\n\t\t\t\t\t{\n\t\t\t\t\t\tname: '256x256',\n\t\t\t\t\t\tvalue: '256x256',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tname: '512x512',\n\t\t\t\t\t\tvalue: '512x512',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tname: '1024x1024',\n\t\t\t\t\t\tvalue: '1024x1024',\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\t'/model': ['dall-e-2'],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tdefault: '1024x1024',\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Resolution',\n\t\t\t\tname: 'size',\n\t\t\t\ttype: 'options',\n\t\t\t\toptions: [\n\t\t\t\t\t{\n\t\t\t\t\t\tname: '1024x1024',\n\t\t\t\t\t\tvalue: '1024x1024',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tname: '1792x1024',\n\t\t\t\t\t\tvalue: '1792x1024',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tname: '1024x1792',\n\t\t\t\t\t\tvalue: '1024x1792',\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\t'/model': ['dall-e-3'],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tdefault: '1024x1024',\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Style',\n\t\t\t\tname: 'style',\n\t\t\t\ttype: 'options',\n\t\t\t\toptions: [\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'Natural',\n\t\t\t\t\t\tvalue: 'natural',\n\t\t\t\t\t\tdescription: 'Produce more natural looking images',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'Vivid',\n\t\t\t\t\t\tvalue: 'vivid',\n\t\t\t\t\t\tdescription: 'Lean towards generating hyper-real and dramatic images',\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\t'/model': ['dall-e-3'],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tdefault: 'vivid',\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Respond with Image URL(s)',\n\t\t\t\tname: 'returnImageUrls',\n\t\t\t\ttype: 'boolean',\n\t\t\t\tdefault: false,\n\t\t\t\tdescription: 'Whether to return image URL(s) instead of binary file(s)',\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Put Output in Field',\n\t\t\t\tname: 'binaryPropertyOutput',\n\t\t\t\ttype: 'string',\n\t\t\t\tdefault: 'data',\n\t\t\t\thint: 'The name of the output field to put the binary file data in',\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\treturnImageUrls: [false],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t],\n\t},\n];\n\nconst displayOptions = {\n\tshow: {\n\t\toperation: ['generate'],\n\t\tresource: ['image'],\n\t},\n};\n\nexport const description = updateDisplayOptions(displayOptions, properties);\n\nexport async function execute(this: IExecuteFunctions, i: number): Promise<INodeExecutionData[]> {\n\tconst model = this.getNodeParameter('model', i) as string;\n\tconst prompt = this.getNodeParameter('prompt', i) as string;\n\tconst options = this.getNodeParameter('options', i, {});\n\tlet response_format = 'b64_json';\n\tlet binaryPropertyOutput = 'data';\n\n\tif (options.returnImageUrls) {\n\t\tresponse_format = 'url';\n\t}\n\n\tif (options.binaryPropertyOutput) {\n\t\tbinaryPropertyOutput = options.binaryPropertyOutput as string;\n\t\tdelete options.binaryPropertyOutput;\n\t}\n\n\tdelete options.returnImageUrls;\n\n\tconst body: IDataObject = {\n\t\tprompt,\n\t\tmodel,\n\t\tresponse_format,\n\t\t...options,\n\t};\n\n\tconst { data } = await apiRequest.call(this, 'POST', '/images/generations', { body });\n\n\tif (response_format === 'url') {\n\t\treturn ((data as IDataObject[]) || []).map((entry) => ({\n\t\t\tjson: entry,\n\t\t\tpairedItem: { item: i },\n\t\t}));\n\t} else {\n\t\tconst returnData: INodeExecutionData[] = [];\n\n\t\tfor (const entry of data) {\n\t\t\tconst binaryData = await this.helpers.prepareBinaryData(\n\t\t\t\tBuffer.from(entry.b64_json as string, 'base64'),\n\t\t\t\t'data',\n\t\t\t);\n\t\t\treturnData.push({\n\t\t\t\tjson: Object.assign({}, binaryData, {\n\t\t\t\t\tdata: undefined,\n\t\t\t\t}),\n\t\t\t\tbinary: {\n\t\t\t\t\t[binaryPropertyOutput]: binaryData,\n\t\t\t\t},\n\t\t\t\tpairedItem: { item: i },\n\t\t\t});\n\t\t}\n\n\t\treturn returnData;\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAMA,0BAAqC;AAErC,uBAA2B;AAE3B,MAAM,aAAgC;AAAA,EACrC;AAAA,IACC,aAAa;AAAA,IACb,MAAM;AAAA,IACN,MAAM;AAAA,IACN,SAAS;AAAA,IACT,aAAa;AAAA,IACb,SAAS;AAAA,MACR;AAAA,QACC,MAAM;AAAA,QACN,OAAO;AAAA,MACR;AAAA,MACA;AAAA,QACC,MAAM;AAAA,QACN,OAAO;AAAA,MACR;AAAA,IACD;AAAA,EACD;AAAA,EACA;AAAA,IACC,aAAa;AAAA,IACb,MAAM;AAAA,IACN,MAAM;AAAA,IACN,aAAa;AAAA,IACb,aACC;AAAA,IACD,SAAS;AAAA,IACT,aAAa;AAAA,MACZ,MAAM;AAAA,IACP;AAAA,EACD;AAAA,EACA;AAAA,IACC,aAAa;AAAA,IACb,MAAM;AAAA,IACN,aAAa;AAAA,IACb,MAAM;AAAA,IACN,SAAS,CAAC;AAAA,IACV,SAAS;AAAA,MACR;AAAA,QACC,aAAa;AAAA,QACb,MAAM;AAAA,QACN,SAAS;AAAA,QACT,aAAa;AAAA,QACb,MAAM;AAAA,QACN,aAAa;AAAA,UACZ,UAAU;AAAA,UACV,UAAU;AAAA,QACX;AAAA,QACA,gBAAgB;AAAA,UACf,MAAM;AAAA,YACL,UAAU,CAAC,UAAU;AAAA,UACtB;AAAA,QACD;AAAA,MACD;AAAA,MACA;AAAA,QACC,aAAa;AAAA,QACb,MAAM;AAAA,QACN,MAAM;AAAA,QACN,aACC;AAAA,QACD,SAAS;AAAA,UACR;AAAA,YACC,MAAM;AAAA,YACN,OAAO;AAAA,U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H,OAAO;AACN,UAAM,aAAmC,CAAC;AAE1C,eAAW,SAAS,MAAM;AACzB,YAAM,aAAa,MAAM,KAAK,QAAQ;AAAA,QACrC,OAAO,KAAK,MAAM,UAAoB,QAAQ;AAAA,QAC9C;AAAA,MACD;AACA,iBAAW,KAAK;AAAA,QACf,MAAM,OAAO,OAAO,CAAC,GAAG,YAAY;AAAA,UACnC,MAAM;AAAA,QACP,CAAC;AAAA,QACD,QAAQ;AAAA,UACP,CAAC,oBAAoB,GAAG;AAAA,QACzB;AAAA,QACA,YAAY,EAAE,MAAM,EAAE;AAAA,MACvB,CAAC;AAAA,IACF;AAEA,WAAO;AAAA,EACR;AACD;","names":[]}
1
+ {"version":3,"sources":["../../../../../../nodes/vendors/OpenAi/actions/image/generate.operation.ts"],"sourcesContent":["import type {\n\tINodeProperties,\n\tIExecuteFunctions,\n\tINodeExecutionData,\n\tIDataObject,\n} from 'n8n-workflow';\nimport { updateDisplayOptions } from 'n8n-workflow';\n\nimport { apiRequest } from '../../transport';\n\nconst properties: INodeProperties[] = [\n\t{\n\t\tdisplayName: 'Model',\n\t\tname: 'model',\n\t\ttype: 'options',\n\t\tdefault: 'dall-e-3',\n\t\tdescription: 'The model to use for image generation',\n\t\toptions: [\n\t\t\t{\n\t\t\t\tname: 'DALL·E 2',\n\t\t\t\tvalue: 'dall-e-2',\n\t\t\t},\n\t\t\t{\n\t\t\t\tname: 'DALL·E 3',\n\t\t\t\tvalue: 'dall-e-3',\n\t\t\t},\n\t\t\t{\n\t\t\t\tname: 'GPT Image 1',\n\t\t\t\tvalue: 'gpt-image-1',\n\t\t\t},\n\t\t],\n\t},\n\t{\n\t\tdisplayName: 'Prompt',\n\t\tname: 'prompt',\n\t\ttype: 'string',\n\t\tplaceholder: 'e.g. A cute cat eating a dinosaur',\n\t\tdescription:\n\t\t\t'A text description of the desired image(s). The maximum length is 1000 characters for dall-e-2 and 4000 characters for dall-e-3.',\n\t\tdefault: '',\n\t\ttypeOptions: {\n\t\t\trows: 2,\n\t\t},\n\t},\n\t{\n\t\tdisplayName: 'Options',\n\t\tname: 'options',\n\t\tplaceholder: 'Add Option',\n\t\ttype: 'collection',\n\t\tdefault: {},\n\t\toptions: [\n\t\t\t{\n\t\t\t\tdisplayName: 'Number of Images',\n\t\t\t\tname: 'n',\n\t\t\t\tdefault: 1,\n\t\t\t\tdescription: 'Number of images to generate',\n\t\t\t\ttype: 'number',\n\t\t\t\ttypeOptions: {\n\t\t\t\t\tminValue: 1,\n\t\t\t\t\tmaxValue: 10,\n\t\t\t\t},\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\t'/model': ['dall-e-2'],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Quality',\n\t\t\t\tname: 'dalleQuality',\n\t\t\t\ttype: 'options',\n\t\t\t\tdescription:\n\t\t\t\t\t'The quality of the image that will be generated, HD creates images with finer details and greater consistency across the image',\n\t\t\t\toptions: [\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'HD',\n\t\t\t\t\t\tvalue: 'hd',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'Standard',\n\t\t\t\t\t\tvalue: 'standard',\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\t'/model': ['dall-e-3'],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tdefault: 'standard',\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Quality',\n\t\t\t\tname: 'quality',\n\t\t\t\ttype: 'options',\n\t\t\t\tdescription:\n\t\t\t\t\t'The quality of the image that will be generated, High creates images with finer details and greater consistency across the image',\n\t\t\t\toptions: [\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'High',\n\t\t\t\t\t\tvalue: 'high',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'Medium',\n\t\t\t\t\t\tvalue: 'medium',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'Low',\n\t\t\t\t\t\tvalue: 'low',\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\t'/model': ['gpt-image-1'],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tdefault: 'medium',\n\t\t\t},\n\n\t\t\t{\n\t\t\t\tdisplayName: 'Resolution',\n\t\t\t\tname: 'size',\n\t\t\t\ttype: 'options',\n\t\t\t\toptions: [\n\t\t\t\t\t{\n\t\t\t\t\t\tname: '256x256',\n\t\t\t\t\t\tvalue: '256x256',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tname: '512x512',\n\t\t\t\t\t\tvalue: '512x512',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tname: '1024x1024',\n\t\t\t\t\t\tvalue: '1024x1024',\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\t'/model': ['dall-e-2'],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tdefault: '1024x1024',\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Resolution',\n\t\t\t\tname: 'size',\n\t\t\t\ttype: 'options',\n\t\t\t\toptions: [\n\t\t\t\t\t{\n\t\t\t\t\t\tname: '1024x1024',\n\t\t\t\t\t\tvalue: '1024x1024',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tname: '1792x1024',\n\t\t\t\t\t\tvalue: '1792x1024',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tname: '1024x1792',\n\t\t\t\t\t\tvalue: '1024x1792',\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\t'/model': ['dall-e-3'],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tdefault: '1024x1024',\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Resolution',\n\t\t\t\tname: 'size',\n\t\t\t\ttype: 'options',\n\t\t\t\toptions: [\n\t\t\t\t\t{\n\t\t\t\t\t\tname: '1024x1024',\n\t\t\t\t\t\tvalue: '1024x1024',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tname: '1024x1536',\n\t\t\t\t\t\tvalue: '1024x1536',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tname: '1536x1024',\n\t\t\t\t\t\tvalue: '1536x1024',\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\t'/model': ['gpt-image-1'],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tdefault: '1024x1024',\n\t\t\t},\n\n\t\t\t{\n\t\t\t\tdisplayName: 'Style',\n\t\t\t\tname: 'style',\n\t\t\t\ttype: 'options',\n\t\t\t\toptions: [\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'Natural',\n\t\t\t\t\t\tvalue: 'natural',\n\t\t\t\t\t\tdescription: 'Produce more natural looking images',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'Vivid',\n\t\t\t\t\t\tvalue: 'vivid',\n\t\t\t\t\t\tdescription: 'Lean towards generating hyper-real and dramatic images',\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\t'/model': ['dall-e-3'],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tdefault: 'vivid',\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Respond with Image URL(s)',\n\t\t\t\tname: 'returnImageUrls',\n\t\t\t\ttype: 'boolean',\n\t\t\t\tdefault: false,\n\t\t\t\tdescription: 'Whether to return image URL(s) instead of binary file(s)',\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Put Output in Field',\n\t\t\t\tname: 'binaryPropertyOutput',\n\t\t\t\ttype: 'string',\n\t\t\t\tdefault: 'data',\n\t\t\t\thint: 'The name of the output field to put the binary file data in',\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\treturnImageUrls: [false],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t],\n\t},\n];\n\nconst displayOptions = {\n\tshow: {\n\t\toperation: ['generate'],\n\t\tresource: ['image'],\n\t},\n};\n\nexport const description = updateDisplayOptions(displayOptions, properties);\n\nexport async function execute(this: IExecuteFunctions, i: number): Promise<INodeExecutionData[]> {\n\tconst model = this.getNodeParameter('model', i) as string;\n\tconst prompt = this.getNodeParameter('prompt', i) as string;\n\tconst options = this.getNodeParameter('options', i, {});\n\tlet response_format = 'b64_json';\n\tlet binaryPropertyOutput = 'data';\n\n\tif (options.returnImageUrls) {\n\t\tresponse_format = 'url';\n\t}\n\n\tif (options.binaryPropertyOutput) {\n\t\tbinaryPropertyOutput = options.binaryPropertyOutput as string;\n\t\tdelete options.binaryPropertyOutput;\n\t}\n\n\tif (options.dalleQuality) {\n\t\toptions.quality = options.dalleQuality;\n\t\tdelete options.dalleQuality;\n\t}\n\n\tdelete options.returnImageUrls;\n\tconst body: IDataObject = {\n\t\tprompt,\n\t\tmodel,\n\t\tresponse_format: model !== 'gpt-image-1' ? response_format : undefined, // gpt-image-1 does not support response_format\n\t\t...options,\n\t};\n\n\tconst { data } = await apiRequest.call(this, 'POST', '/images/generations', { body });\n\tif (response_format === 'url') {\n\t\treturn ((data as IDataObject[]) || []).map((entry) => ({\n\t\t\tjson: entry,\n\t\t\tpairedItem: { item: i },\n\t\t}));\n\t} else {\n\t\tconst returnData: INodeExecutionData[] = [];\n\n\t\tfor (const entry of data) {\n\t\t\tconst binaryData = await this.helpers.prepareBinaryData(\n\t\t\t\tBuffer.from(entry.b64_json as string, 'base64'),\n\t\t\t\t'data',\n\t\t\t);\n\t\t\treturnData.push({\n\t\t\t\tjson: Object.assign({}, binaryData, {\n\t\t\t\t\tdata: undefined,\n\t\t\t\t}),\n\t\t\t\tbinary: {\n\t\t\t\t\t[binaryPropertyOutput]: binaryData,\n\t\t\t\t},\n\t\t\t\tpairedItem: { item: i },\n\t\t\t});\n\t\t}\n\n\t\treturn returnData;\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAMA,0BAAqC;AAErC,uBAA2B;AAE3B,MAAM,aAAgC;AAAA,EACrC;AAAA,IACC,aAAa;AAAA,IACb,MAAM;AAAA,IACN,MAAM;AAAA,IACN,SAAS;AAAA,IACT,aAAa;AAAA,IACb,SAAS;AAAA,MACR;AAAA,QACC,MAAM;AAAA,QACN,OAAO;AAAA,MACR;AAAA,MACA;AAAA,QACC,MAAM;AAAA,QACN,OAAO;AAAA,MACR;AAAA,MACA;AAAA,QACC,MAAM;AAAA,QACN,OAAO;AAAA,MACR;AAAA,IACD;AAAA,EACD;AAAA,EACA;AAAA,IACC,aAAa;AAAA,IACb,MAAM;AAAA,IACN,MAAM;AAAA,IACN,aAAa;AAAA,IACb,aACC;AAAA,IACD,SAAS;AAAA,IACT,aAAa;AAAA,MACZ,MAAM;AAAA,IACP;AAAA,EACD;AAAA,EACA;AAAA,IACC,aAAa;AAAA,IACb,MAAM;AAAA,IACN,aAAa;AAAA,IACb,MAAM;AAAA,IACN,SAAS,CAAC;AAAA,IACV,SAAS;AAAA,MACR;AAAA,QACC,aAAa;AAAA,QACb,MAAM;AAAA,QACN,SAAS;AAAA,QACT,aAAa;AAAA,QACb,MAAM;AAAA,QACN,aAAa;AAAA,UACZ,UAAU;AAAA,UACV,UAAU;AAAA,QACX;AAAA,QACA,gBAAgB;AAAA,UACf,MAAM;AAAA,YACL,UAAU,CAAC,UAAU;AAAA,UACtB;AAAA,QACD;AAAA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AAO,OAAO,CAAC,GAAG,YAAY;AAAA,UACnC,MAAM;AAAA,QACP,CAAC;AAAA,QACD,QAAQ;AAAA,UACP,CAAC,oBAAoB,GAAG;AAAA,QACzB;AAAA,QACA,YAAY,EAAE,MAAM,EAAE;AAAA,MACvB,CAAC;AAAA,IACF;AAEA,WAAO;AAAA,EACR;AACD;","names":[]}
@@ -78,7 +78,7 @@ async function modelSearch(filter) {
78
78
  const url = credentials.url && new URL(credentials.url);
79
79
  const isCustomAPI = url && url.hostname !== "api.openai.com";
80
80
  return await getModelSearch(
81
- (model) => isCustomAPI || model.id.startsWith("gpt-") || model.id.startsWith("ft:") || model.id.startsWith("o1") || model.id.startsWith("o3")
81
+ (model) => !isCustomAPI && !(model.id.startsWith("babbage") || model.id.startsWith("davinci") || model.id.startsWith("computer-use") || model.id.startsWith("dall-e") || model.id.startsWith("text-embedding") || model.id.startsWith("tts") || model.id.startsWith("whisper") || model.id.startsWith("omni-moderation") || model.id.startsWith("gpt-") && model.id.includes("instruct"))
82
82
  )(this, filter);
83
83
  }
84
84
  async function imageModelSearch(filter) {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../nodes/vendors/OpenAi/methods/listSearch.ts"],"sourcesContent":["import type {\n\tIDataObject,\n\tILoadOptionsFunctions,\n\tINodeListSearchItems,\n\tINodeListSearchResult,\n} from 'n8n-workflow';\nimport type { Assistant } from 'openai/resources/beta/assistants';\nimport type { Model } from 'openai/resources/models';\n\nimport { apiRequest } from '../transport';\n\nexport async function fileSearch(\n\tthis: ILoadOptionsFunctions,\n\tfilter?: string,\n): Promise<INodeListSearchResult> {\n\tconst { data } = await apiRequest.call(this, 'GET', '/files');\n\n\tif (filter) {\n\t\tconst results: INodeListSearchItems[] = [];\n\n\t\tfor (const file of data || []) {\n\t\t\tif ((file.filename as string)?.toLowerCase().includes(filter.toLowerCase())) {\n\t\t\t\tresults.push({\n\t\t\t\t\tname: file.filename as string,\n\t\t\t\t\tvalue: file.id as string,\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\treturn {\n\t\t\tresults,\n\t\t};\n\t} else {\n\t\treturn {\n\t\t\tresults: (data || []).map((file: IDataObject) => ({\n\t\t\t\tname: file.filename as string,\n\t\t\t\tvalue: file.id as string,\n\t\t\t})),\n\t\t};\n\t}\n}\n\nconst getModelSearch =\n\t(filterCondition: (model: Model) => boolean) =>\n\tasync (ctx: ILoadOptionsFunctions, filter?: string): Promise<INodeListSearchResult> => {\n\t\tlet { data } = (await apiRequest.call(ctx, 'GET', '/models')) as { data: Model[] };\n\n\t\tdata = data?.filter((model) => filterCondition(model));\n\n\t\tlet results: INodeListSearchItems[] = [];\n\n\t\tif (filter) {\n\t\t\tfor (const model of data || []) {\n\t\t\t\tif (model.id?.toLowerCase().includes(filter.toLowerCase())) {\n\t\t\t\t\tresults.push({\n\t\t\t\t\t\tname: model.id.toUpperCase(),\n\t\t\t\t\t\tvalue: model.id,\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tresults = (data || []).map((model) => ({\n\t\t\t\tname: model.id.toUpperCase(),\n\t\t\t\tvalue: model.id,\n\t\t\t}));\n\t\t}\n\n\t\tresults = results.sort((a, b) => a.name.localeCompare(b.name));\n\n\t\treturn {\n\t\t\tresults,\n\t\t};\n\t};\n\nexport async function modelSearch(\n\tthis: ILoadOptionsFunctions,\n\tfilter?: string,\n): Promise<INodeListSearchResult> {\n\tconst credentials = await this.getCredentials<{ url: string }>('openAiApi');\n\tconst url = credentials.url && new URL(credentials.url);\n\tconst isCustomAPI = url && url.hostname !== 'api.openai.com';\n\n\treturn await getModelSearch(\n\t\t(model) =>\n\t\t\tisCustomAPI ||\n\t\t\tmodel.id.startsWith('gpt-') ||\n\t\t\tmodel.id.startsWith('ft:') ||\n\t\t\tmodel.id.startsWith('o1') ||\n\t\t\tmodel.id.startsWith('o3'),\n\t)(this, filter);\n}\n\nexport async function imageModelSearch(\n\tthis: ILoadOptionsFunctions,\n\tfilter?: string,\n): Promise<INodeListSearchResult> {\n\treturn await getModelSearch(\n\t\t(model) => model.id.includes('vision') || model.id.includes('gpt-4o'),\n\t)(this, filter);\n}\n\nexport async function assistantSearch(\n\tthis: ILoadOptionsFunctions,\n\tfilter?: string,\n\tpaginationToken?: string,\n): Promise<INodeListSearchResult> {\n\tconst { data, has_more, last_id } = (await apiRequest.call(this, 'GET', '/assistants', {\n\t\theaders: {\n\t\t\t'OpenAI-Beta': 'assistants=v2',\n\t\t},\n\t\tqs: {\n\t\t\tlimit: 100,\n\t\t\tafter: paginationToken,\n\t\t},\n\t})) as {\n\t\tdata: Assistant[];\n\t\thas_more: boolean;\n\t\tlast_id: string;\n\t\tfirst_id: string;\n\t};\n\n\tif (has_more) {\n\t\tpaginationToken = last_id;\n\t} else {\n\t\tpaginationToken = undefined;\n\t}\n\n\tif (filter) {\n\t\tconst results: INodeListSearchItems[] = [];\n\n\t\tfor (const assistant of data || []) {\n\t\t\tif (assistant.name?.toLowerCase().includes(filter.toLowerCase())) {\n\t\t\t\tresults.push({\n\t\t\t\t\tname: assistant.name,\n\t\t\t\t\tvalue: assistant.id,\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\treturn {\n\t\t\tresults,\n\t\t};\n\t} else {\n\t\treturn {\n\t\t\tresults: (data || []).map((assistant) => ({\n\t\t\t\tname: assistant.name ?? assistant.id,\n\t\t\t\tvalue: assistant.id,\n\t\t\t})),\n\t\t\tpaginationToken,\n\t\t};\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASA,uBAA2B;AAE3B,eAAsB,WAErB,QACiC;AACjC,QAAM,EAAE,KAAK,IAAI,MAAM,4BAAW,KAAK,MAAM,OAAO,QAAQ;AAE5D,MAAI,QAAQ;AACX,UAAM,UAAkC,CAAC;AAEzC,eAAW,QAAQ,QAAQ,CAAC,GAAG;AAC9B,UAAK,KAAK,UAAqB,YAAY,EAAE,SAAS,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AM;AAAA,IACZ,CAAC,UACA,eACA,MAAM,GAAG,WAAW,MAAM,KAC1B,MAAM,GAAG,WAAW,KAAK,KACzB,MAAM,GAAG,WAAW,IAAI,KACxB,MAAM,GAAG,WAAW,IAAI;AAAA,EAC1B,EAAE,MAAM,MAAM;AACf;AAEA,eAAsB,iBAErB,QACiC;AACjC,SAAO,MAAM;AAAA,IACZ,CAAC,UAAU,MAAM,GAAG,SAAS,QAAQ,KAAK,MAAM,GAAG,SAAS,QAAQ;AAAA,EACrE,EAAE,MAAM,MAAM;AACf;AAEA,eAAsB,gBAErB,QACA,iBACiC;AACjC,QAAM,EAAE,MAAM,UAAU,QAAQ,IAAK,MAAM,4BAAW,KAAK,MAAM,OAAO,eAAe;AAAA,IACtF,SAAS;AAAA,MACR,eAAe;AAAA,IAChB;AAAA,IACA,IAAI;AAAA,MACH,OAAO;AAAA,MACP,OAAO;AAAA,IACR;AAAA,EACD,CAAC;AAOD,MAAI,UAAU;AACb,sBAAkB;AAAA,EACnB,OAAO;AACN,sBAAkB;AAAA,EACnB;AAEA,MAAI,QAAQ;AACX,UAAM,UAAkC,CAAC;AAEzC,eAAW,aAAa,QAAQ,CAAC,GAAG;AACnC,UAAI,UAAU,MAAM,YAAY,EAAE,SAAS,OAAO,YAAY,CAAC,GAAG;AACjE,gBAAQ,KAAK;AAAA,UACZ,MAAM,UAAU;AAAA,UAChB,OAAO,UAAU;AAAA,QAClB,CAAC;AAAA,MACF;AAAA,IACD;AAEA,WAAO;AAAA,MACN;AAAA,IACD;AAAA,EACD,OAAO;AACN,WAAO;AAAA,MACN,UAAU,QAAQ,CAAC,GAAG,IAAI,CAAC,eAAe;AAAA,QACzC,MAAM,UAAU,QAAQ,UAAU;AAAA,QAClC,OAAO,UAAU;AAAA,MAClB,EAAE;AAAA,MACF;AAAA,IACD;AAAA,EACD;AACD;","names":[]}
1
+ {"version":3,"sources":["../../../../../nodes/vendors/OpenAi/methods/listSearch.ts"],"sourcesContent":["import type {\n\tIDataObject,\n\tILoadOptionsFunctions,\n\tINodeListSearchItems,\n\tINodeListSearchResult,\n} from 'n8n-workflow';\nimport type { Assistant } from 'openai/resources/beta/assistants';\nimport type { Model } from 'openai/resources/models';\n\nimport { apiRequest } from '../transport';\n\nexport async function fileSearch(\n\tthis: ILoadOptionsFunctions,\n\tfilter?: string,\n): Promise<INodeListSearchResult> {\n\tconst { data } = await apiRequest.call(this, 'GET', '/files');\n\n\tif (filter) {\n\t\tconst results: INodeListSearchItems[] = [];\n\n\t\tfor (const file of data || []) {\n\t\t\tif ((file.filename as string)?.toLowerCase().includes(filter.toLowerCase())) {\n\t\t\t\tresults.push({\n\t\t\t\t\tname: file.filename as string,\n\t\t\t\t\tvalue: file.id as string,\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\treturn {\n\t\t\tresults,\n\t\t};\n\t} else {\n\t\treturn {\n\t\t\tresults: (data || []).map((file: IDataObject) => ({\n\t\t\t\tname: file.filename as string,\n\t\t\t\tvalue: file.id as string,\n\t\t\t})),\n\t\t};\n\t}\n}\n\nconst getModelSearch =\n\t(filterCondition: (model: Model) => boolean) =>\n\tasync (ctx: ILoadOptionsFunctions, filter?: string): Promise<INodeListSearchResult> => {\n\t\tlet { data } = (await apiRequest.call(ctx, 'GET', '/models')) as { data: Model[] };\n\n\t\tdata = data?.filter((model) => filterCondition(model));\n\n\t\tlet results: INodeListSearchItems[] = [];\n\n\t\tif (filter) {\n\t\t\tfor (const model of data || []) {\n\t\t\t\tif (model.id?.toLowerCase().includes(filter.toLowerCase())) {\n\t\t\t\t\tresults.push({\n\t\t\t\t\t\tname: model.id.toUpperCase(),\n\t\t\t\t\t\tvalue: model.id,\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tresults = (data || []).map((model) => ({\n\t\t\t\tname: model.id.toUpperCase(),\n\t\t\t\tvalue: model.id,\n\t\t\t}));\n\t\t}\n\n\t\tresults = results.sort((a, b) => a.name.localeCompare(b.name));\n\t\treturn {\n\t\t\tresults,\n\t\t};\n\t};\n\nexport async function modelSearch(\n\tthis: ILoadOptionsFunctions,\n\tfilter?: string,\n): Promise<INodeListSearchResult> {\n\tconst credentials = await this.getCredentials<{ url: string }>('openAiApi');\n\tconst url = credentials.url && new URL(credentials.url);\n\tconst isCustomAPI = url && url.hostname !== 'api.openai.com';\n\treturn await getModelSearch(\n\t\t(model) =>\n\t\t\t!isCustomAPI &&\n\t\t\t!(\n\t\t\t\tmodel.id.startsWith('babbage') ||\n\t\t\t\tmodel.id.startsWith('davinci') ||\n\t\t\t\tmodel.id.startsWith('computer-use') ||\n\t\t\t\tmodel.id.startsWith('dall-e') ||\n\t\t\t\tmodel.id.startsWith('text-embedding') ||\n\t\t\t\tmodel.id.startsWith('tts') ||\n\t\t\t\tmodel.id.startsWith('whisper') ||\n\t\t\t\tmodel.id.startsWith('omni-moderation') ||\n\t\t\t\t(model.id.startsWith('gpt-') && model.id.includes('instruct'))\n\t\t\t),\n\t)(this, filter);\n}\n\nexport async function imageModelSearch(\n\tthis: ILoadOptionsFunctions,\n\tfilter?: string,\n): Promise<INodeListSearchResult> {\n\treturn await getModelSearch(\n\t\t(model) => model.id.includes('vision') || model.id.includes('gpt-4o'),\n\t)(this, filter);\n}\n\nexport async function assistantSearch(\n\tthis: ILoadOptionsFunctions,\n\tfilter?: string,\n\tpaginationToken?: string,\n): Promise<INodeListSearchResult> {\n\tconst { data, has_more, last_id } = (await apiRequest.call(this, 'GET', '/assistants', {\n\t\theaders: {\n\t\t\t'OpenAI-Beta': 'assistants=v2',\n\t\t},\n\t\tqs: {\n\t\t\tlimit: 100,\n\t\t\tafter: paginationToken,\n\t\t},\n\t})) as {\n\t\tdata: Assistant[];\n\t\thas_more: boolean;\n\t\tlast_id: string;\n\t\tfirst_id: string;\n\t};\n\n\tif (has_more) {\n\t\tpaginationToken = last_id;\n\t} else {\n\t\tpaginationToken = undefined;\n\t}\n\n\tif (filter) {\n\t\tconst results: INodeListSearchItems[] = [];\n\n\t\tfor (const assistant of data || []) {\n\t\t\tif (assistant.name?.toLowerCase().includes(filter.toLowerCase())) {\n\t\t\t\tresults.push({\n\t\t\t\t\tname: assistant.name,\n\t\t\t\t\tvalue: assistant.id,\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\treturn {\n\t\t\tresults,\n\t\t};\n\t} else {\n\t\treturn {\n\t\t\tresults: (data || []).map((assistant) => ({\n\t\t\t\tname: assistant.name ?? assistant.id,\n\t\t\t\tvalue: assistant.id,\n\t\t\t})),\n\t\t\tpaginationToken,\n\t\t};\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASA,uBAA2B;AAE3B,eAAsB,WAErB,QACiC;AACjC,QAAM,EAAE,KAAK,IAAI,MAAM,4BAAW,KAAK,MAAM,OAAO,QAAQ;AAE5D,MAAI,QAAQ;AACX,UAAM,UAAkC,CAAC;AAEzC,eAAW,QAAQ,QAAQ,CAAC,GAAG;AAC9B,UAAK,KAAK,UAAqB,YAAY,EAAE,SAAS,OAAO,YAAY,CAAC,GAAG;AAC5E,gBAAQ,KAAK;AAAA,UACZ,MAAM,KAAK;AAAA,UACX,OAAO,KAAK;AAAA,QACb,CAAC;AAAA,MACF;AAAA,IACD;AAEA,WAAO;AAAA,MACN;AAAA,IACD;AAAA,EACD,OAAO;AACN,WAAO;AAAA,MACN,UAAU,QAAQ,CAAC,GAAG,IAAI,CAAC,UAAuB;AAAA,QACjD,MAAM,KAAK;AAAA,QACX,OAAO,KAAK;AAAA,MACb,EAAE;AAAA,IACH;AAAA,EACD;AACD;AAEA,MAAM,iBACL,CAAC,oBACD,OAAO,KAA4B,WAAoD;AACtF,MAAI,EAAE,KAAK,IAAK,MAAM,4BAAW,KAAK,KAAK,OAAO,SAAS;AAE3D,SAAO,MAAM,OAAO,CAAC,UAAU,gBAAgB,KAAK,CAAC;AAErD,MAAI,UAAkC,CAAC;AAEvC,MAAI,QAA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,gBAErB,QACA,iBACiC;AACjC,QAAM,EAAE,MAAM,UAAU,QAAQ,IAAK,MAAM,4BAAW,KAAK,MAAM,OAAO,eAAe;AAAA,IACtF,SAAS;AAAA,MACR,eAAe;AAAA,IAChB;AAAA,IACA,IAAI;AAAA,MACH,OAAO;AAAA,MACP,OAAO;AAAA,IACR;AAAA,EACD,CAAC;AAOD,MAAI,UAAU;AACb,sBAAkB;AAAA,EACnB,OAAO;AACN,sBAAkB;AAAA,EACnB;AAEA,MAAI,QAAQ;AACX,UAAM,UAAkC,CAAC;AAEzC,eAAW,aAAa,QAAQ,CAAC,GAAG;AACnC,UAAI,UAAU,MAAM,YAAY,EAAE,SAAS,OAAO,YAAY,CAAC,GAAG;AACjE,gBAAQ,KAAK;AAAA,UACZ,MAAM,UAAU;AAAA,UAChB,OAAO,UAAU;AAAA,QAClB,CAAC;AAAA,MACF;AAAA,IACD;AAEA,WAAO;AAAA,MACN;AAAA,IACD;AAAA,EACD,OAAO;AACN,WAAO;AAAA,MACN,UAAU,QAAQ,CAAC,GAAG,IAAI,CAAC,eAAe;AAAA,QACzC,MAAM,UAAU,QAAQ,UAAU;AAAA,QAClC,OAAO,UAAU;AAAA,MAClB,EAAE;AAAA,MACF;AAAA,IACD;AAAA,EACD;AACD;","names":[]}
@@ -10,7 +10,7 @@
10
10
  {"name":"milvusApi","displayName":"Milvus","documentationUrl":"milvus","properties":[{"displayName":"Base URL","name":"baseUrl","required":true,"type":"string","default":"http://localhost:19530"},{"displayName":"Username","name":"username","type":"string","default":""},{"displayName":"Password","name":"password","type":"string","typeOptions":{"password":true},"default":""}],"authenticate":{"type":"generic","properties":{"headers":{"Authorization":"=Bearer {{$credentials.username}}:{{$credentials.password}}"}}},"test":{"request":{"baseURL":"={{ $credentials.baseUrl }}","url":"/v1/vector/collections","method":"GET"}},"supportedNodes":["vectorStoreMilvus"],"iconUrl":{"light":"icons/@n8n/n8n-nodes-langchain/dist/nodes/vector_store/VectorStoreMilvus/milvus-icon-black.svg","dark":"icons/@n8n/n8n-nodes-langchain/dist/nodes/vector_store/VectorStoreMilvus/milvus-icon-white.svg"}},
11
11
  {"name":"mistralCloudApi","displayName":"Mistral Cloud API","documentationUrl":"mistral","properties":[{"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":"https://api.mistral.ai/v1","url":"/models","method":"GET"}},"supportedNodes":["embeddingsMistralCloud","lmChatMistralCloud"],"iconUrl":"icons/@n8n/n8n-nodes-langchain/dist/nodes/embeddings/EmbeddingsMistralCloud/mistral.svg"},
12
12
  {"name":"ollamaApi","displayName":"Ollama","documentationUrl":"ollama","properties":[{"displayName":"Base URL","name":"baseUrl","required":true,"type":"string","default":"http://localhost:11434"}],"test":{"request":{"baseURL":"={{ $credentials.baseUrl }}","url":"/","method":"GET"}},"supportedNodes":["embeddingsOllama","lmChatOllama","lmOllama"],"iconUrl":"icons/@n8n/n8n-nodes-langchain/dist/nodes/embeddings/EmbeddingsOllama/ollama.svg"},
13
- {"name":"openRouterApi","displayName":"OpenRouter","documentationUrl":"openrouter","properties":[{"displayName":"API Key","name":"apiKey","type":"string","typeOptions":{"password":true},"required":true,"default":""},{"displayName":"Base URL","name":"url","type":"hidden","default":"https://openrouter.ai/api/v1"}],"authenticate":{"type":"generic","properties":{"headers":{"Authorization":"=Bearer {{$credentials.apiKey}}"}}},"test":{"request":{"baseURL":"={{ $credentials.url }}","url":"/models"}},"supportedNodes":["lmChatOpenRouter"],"iconUrl":{"light":"icons/@n8n/n8n-nodes-langchain/dist/nodes/llms/LmChatOpenRouter/openrouter.svg","dark":"icons/@n8n/n8n-nodes-langchain/dist/nodes/llms/LmChatOpenRouter/openrouter.dark.svg"}},
13
+ {"name":"openRouterApi","displayName":"OpenRouter","documentationUrl":"openrouter","properties":[{"displayName":"API Key","name":"apiKey","type":"string","typeOptions":{"password":true},"required":true,"default":""},{"displayName":"Base URL","name":"url","type":"hidden","default":"https://openrouter.ai/api/v1"}],"authenticate":{"type":"generic","properties":{"headers":{"Authorization":"=Bearer {{$credentials.apiKey}}"}}},"test":{"request":{"baseURL":"={{ $credentials.url }}","url":"/key"}},"supportedNodes":["lmChatOpenRouter"],"iconUrl":{"light":"icons/@n8n/n8n-nodes-langchain/dist/nodes/llms/LmChatOpenRouter/openrouter.svg","dark":"icons/@n8n/n8n-nodes-langchain/dist/nodes/llms/LmChatOpenRouter/openrouter.dark.svg"}},
14
14
  {"name":"pineconeApi","displayName":"PineconeApi","documentationUrl":"pinecone","properties":[{"displayName":"API Key","name":"apiKey","type":"string","typeOptions":{"password":true},"required":true,"default":""}],"authenticate":{"type":"generic","properties":{"headers":{"Api-Key":"={{$credentials.apiKey}}"}}},"test":{"request":{"baseURL":"https://api.pinecone.io/indexes","headers":{"accept":"application/json; charset=utf-8"}}},"supportedNodes":["vectorStorePinecone","vectorStorePineconeInsert","vectorStorePineconeLoad"],"iconUrl":{"light":"icons/@n8n/n8n-nodes-langchain/dist/nodes/vector_store/VectorStorePinecone/pinecone.svg","dark":"icons/@n8n/n8n-nodes-langchain/dist/nodes/vector_store/VectorStorePinecone/pinecone.dark.svg"}},
15
15
  {"name":"qdrantApi","displayName":"QdrantApi","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"},
16
16
  {"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"},