@n8n/n8n-nodes-langchain 1.101.2 → 1.103.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 (174) hide show
  1. package/dist/credentials/CohereApi.credentials.js +7 -1
  2. package/dist/credentials/CohereApi.credentials.js.map +1 -1
  3. package/dist/known/credentials.json +3 -0
  4. package/dist/known/nodes.json +16 -0
  5. package/dist/nodes/agents/Agent/Agent.node.js +1 -0
  6. package/dist/nodes/agents/Agent/Agent.node.js.map +1 -1
  7. package/dist/nodes/agents/Agent/AgentTool.node.js +57 -0
  8. package/dist/nodes/agents/Agent/AgentTool.node.js.map +1 -0
  9. package/dist/nodes/agents/Agent/V2/AgentToolV2.node.js +104 -0
  10. package/dist/nodes/agents/Agent/V2/AgentToolV2.node.js.map +1 -0
  11. package/dist/nodes/agents/Agent/V2/AgentV2.node.js +4 -66
  12. package/dist/nodes/agents/Agent/V2/AgentV2.node.js.map +1 -1
  13. package/dist/nodes/agents/Agent/V2/utils.js +92 -0
  14. package/dist/nodes/agents/Agent/V2/utils.js.map +1 -0
  15. package/dist/nodes/agents/Agent/agents/ToolsAgent/V2/description.js +13 -10
  16. package/dist/nodes/agents/Agent/agents/ToolsAgent/V2/description.js.map +1 -1
  17. package/dist/nodes/agents/Agent/agents/ToolsAgent/V2/execute.js +14 -7
  18. package/dist/nodes/agents/Agent/agents/ToolsAgent/V2/execute.js.map +1 -1
  19. package/dist/nodes/agents/Agent/agents/ToolsAgent/common.js.map +1 -1
  20. package/dist/nodes/chains/SentimentAnalysis/SentimentAnalysis.node.js +1 -1
  21. package/dist/nodes/chains/SentimentAnalysis/SentimentAnalysis.node.js.map +1 -1
  22. package/dist/nodes/embeddings/EmbeddingsOpenAI/EmbeddingsOpenAi.node.js +13 -2
  23. package/dist/nodes/embeddings/EmbeddingsOpenAI/EmbeddingsOpenAi.node.js.map +1 -1
  24. package/dist/nodes/llms/LMChatAnthropic/LmChatAnthropic.node.js +2 -2
  25. package/dist/nodes/llms/LMChatAnthropic/LmChatAnthropic.node.js.map +1 -1
  26. package/dist/nodes/llms/LmChatAwsBedrock/LmChatAwsBedrock.node.js +2 -0
  27. package/dist/nodes/llms/LmChatAwsBedrock/LmChatAwsBedrock.node.js.map +1 -1
  28. package/dist/nodes/llms/LmChatCohere/LmChatCohere.node.js +181 -0
  29. package/dist/nodes/llms/LmChatCohere/LmChatCohere.node.js.map +1 -0
  30. package/dist/nodes/llms/LmChatCohere/cohere.dark.svg +5 -0
  31. package/dist/nodes/llms/LmChatCohere/cohere.svg +5 -0
  32. package/dist/nodes/llms/N8nLlmTracing.js +4 -4
  33. package/dist/nodes/llms/N8nLlmTracing.js.map +1 -1
  34. package/dist/nodes/mcp/McpClientTool/McpClientTool.node.js +55 -5
  35. package/dist/nodes/mcp/McpClientTool/McpClientTool.node.js.map +1 -1
  36. package/dist/nodes/mcp/McpClientTool/loadOptions.js +11 -2
  37. package/dist/nodes/mcp/McpClientTool/loadOptions.js.map +1 -1
  38. package/dist/nodes/mcp/McpClientTool/types.js.map +1 -1
  39. package/dist/nodes/mcp/McpClientTool/utils.js +21 -11
  40. package/dist/nodes/mcp/McpClientTool/utils.js.map +1 -1
  41. package/dist/nodes/mcp/McpTrigger/McpTrigger.node.js +1 -1
  42. package/dist/nodes/mcp/McpTrigger/McpTrigger.node.js.map +1 -1
  43. package/dist/nodes/tools/ToolCode/ToolCode.node.js +1 -2
  44. package/dist/nodes/tools/ToolCode/ToolCode.node.js.map +1 -1
  45. package/dist/nodes/tools/ToolThink/ToolThink.node.js +5 -2
  46. package/dist/nodes/tools/ToolThink/ToolThink.node.js.map +1 -1
  47. package/dist/nodes/tools/ToolVectorStore/ToolVectorStore.node.js +1 -2
  48. package/dist/nodes/tools/ToolVectorStore/ToolVectorStore.node.js.map +1 -1
  49. package/dist/nodes/tools/ToolWorkflow/v2/ToolWorkflowV2.node.js +2 -2
  50. package/dist/nodes/tools/ToolWorkflow/v2/ToolWorkflowV2.node.js.map +1 -1
  51. package/dist/nodes/trigger/ChatTrigger/ChatTrigger.node.js +2 -1
  52. package/dist/nodes/trigger/ChatTrigger/ChatTrigger.node.js.map +1 -1
  53. package/dist/nodes/trigger/ChatTrigger/templates.js +3 -1
  54. package/dist/nodes/trigger/ChatTrigger/templates.js.map +1 -1
  55. package/dist/nodes/vector_store/shared/createVectorStoreNode/operations/retrieveAsToolOperation.js +2 -1
  56. package/dist/nodes/vector_store/shared/createVectorStoreNode/operations/retrieveAsToolOperation.js.map +1 -1
  57. package/dist/nodes/vendors/Anthropic/Anthropic.node.js +42 -0
  58. package/dist/nodes/vendors/Anthropic/Anthropic.node.js.map +1 -0
  59. package/dist/nodes/vendors/Anthropic/actions/descriptions.js +52 -0
  60. package/dist/nodes/vendors/Anthropic/actions/descriptions.js.map +1 -0
  61. package/dist/nodes/vendors/Anthropic/actions/document/analyze.operation.js +125 -0
  62. package/dist/nodes/vendors/Anthropic/actions/document/analyze.operation.js.map +1 -0
  63. package/dist/nodes/vendors/Anthropic/actions/document/index.js +64 -0
  64. package/dist/nodes/vendors/Anthropic/actions/document/index.js.map +1 -0
  65. package/dist/nodes/vendors/Anthropic/actions/file/delete.operation.js +61 -0
  66. package/dist/nodes/vendors/Anthropic/actions/file/delete.operation.js.map +1 -0
  67. package/dist/nodes/vendors/Anthropic/actions/file/get.operation.js +63 -0
  68. package/dist/nodes/vendors/Anthropic/actions/file/get.operation.js.map +1 -0
  69. package/dist/nodes/vendors/Anthropic/actions/file/index.js +94 -0
  70. package/dist/nodes/vendors/Anthropic/actions/file/index.js.map +1 -0
  71. package/dist/nodes/vendors/Anthropic/actions/file/list.operation.js +108 -0
  72. package/dist/nodes/vendors/Anthropic/actions/file/list.operation.js.map +1 -0
  73. package/dist/nodes/vendors/Anthropic/actions/file/upload.operation.js +126 -0
  74. package/dist/nodes/vendors/Anthropic/actions/file/upload.operation.js.map +1 -0
  75. package/dist/nodes/vendors/Anthropic/actions/image/analyze.operation.js +125 -0
  76. package/dist/nodes/vendors/Anthropic/actions/image/analyze.operation.js.map +1 -0
  77. package/dist/nodes/vendors/Anthropic/actions/image/index.js +64 -0
  78. package/dist/nodes/vendors/Anthropic/actions/image/index.js.map +1 -0
  79. package/dist/nodes/vendors/Anthropic/actions/node.type.js +17 -0
  80. package/dist/nodes/vendors/Anthropic/actions/node.type.js.map +1 -0
  81. package/dist/nodes/vendors/Anthropic/actions/prompt/generate.operation.js +87 -0
  82. package/dist/nodes/vendors/Anthropic/actions/prompt/generate.operation.js.map +1 -0
  83. package/dist/nodes/vendors/Anthropic/actions/prompt/improve.operation.js +154 -0
  84. package/dist/nodes/vendors/Anthropic/actions/prompt/improve.operation.js.map +1 -0
  85. package/dist/nodes/vendors/Anthropic/actions/prompt/index.js +95 -0
  86. package/dist/nodes/vendors/Anthropic/actions/prompt/index.js.map +1 -0
  87. package/dist/nodes/vendors/Anthropic/actions/prompt/templatize.operation.js +146 -0
  88. package/dist/nodes/vendors/Anthropic/actions/prompt/templatize.operation.js.map +1 -0
  89. package/dist/nodes/vendors/Anthropic/actions/router.js +93 -0
  90. package/dist/nodes/vendors/Anthropic/actions/router.js.map +1 -0
  91. package/dist/nodes/vendors/Anthropic/actions/text/index.js +64 -0
  92. package/dist/nodes/vendors/Anthropic/actions/text/index.js.map +1 -0
  93. package/dist/nodes/vendors/Anthropic/actions/text/message.operation.js +540 -0
  94. package/dist/nodes/vendors/Anthropic/actions/text/message.operation.js.map +1 -0
  95. package/dist/nodes/vendors/Anthropic/actions/versionDescription.js +125 -0
  96. package/dist/nodes/vendors/Anthropic/actions/versionDescription.js.map +1 -0
  97. package/dist/nodes/vendors/Anthropic/anthropic.svg +1 -0
  98. package/dist/nodes/vendors/Anthropic/helpers/baseAnalyze.js +109 -0
  99. package/dist/nodes/vendors/Anthropic/helpers/baseAnalyze.js.map +1 -0
  100. package/dist/nodes/vendors/Anthropic/helpers/interfaces.js +17 -0
  101. package/dist/nodes/vendors/Anthropic/helpers/interfaces.js.map +1 -0
  102. package/dist/nodes/vendors/Anthropic/helpers/utils.js +84 -0
  103. package/dist/nodes/vendors/Anthropic/helpers/utils.js.map +1 -0
  104. package/dist/nodes/vendors/Anthropic/methods/index.js +39 -0
  105. package/dist/nodes/vendors/Anthropic/methods/index.js.map +1 -0
  106. package/dist/nodes/vendors/Anthropic/methods/listSearch.js +42 -0
  107. package/dist/nodes/vendors/Anthropic/methods/listSearch.js.map +1 -0
  108. package/dist/nodes/vendors/Anthropic/transport/index.js +57 -0
  109. package/dist/nodes/vendors/Anthropic/transport/index.js.map +1 -0
  110. package/dist/nodes/vendors/GoogleGemini/GoogleGemini.node.js +42 -0
  111. package/dist/nodes/vendors/GoogleGemini/GoogleGemini.node.js.map +1 -0
  112. package/dist/nodes/vendors/GoogleGemini/actions/audio/analyze.operation.js +125 -0
  113. package/dist/nodes/vendors/GoogleGemini/actions/audio/analyze.operation.js.map +1 -0
  114. package/dist/nodes/vendors/GoogleGemini/actions/audio/index.js +74 -0
  115. package/dist/nodes/vendors/GoogleGemini/actions/audio/index.js.map +1 -0
  116. package/dist/nodes/vendors/GoogleGemini/actions/audio/transcribe.operation.js +184 -0
  117. package/dist/nodes/vendors/GoogleGemini/actions/audio/transcribe.operation.js.map +1 -0
  118. package/dist/nodes/vendors/GoogleGemini/actions/descriptions.js +52 -0
  119. package/dist/nodes/vendors/GoogleGemini/actions/descriptions.js.map +1 -0
  120. package/dist/nodes/vendors/GoogleGemini/actions/document/analyze.operation.js +125 -0
  121. package/dist/nodes/vendors/GoogleGemini/actions/document/analyze.operation.js.map +1 -0
  122. package/dist/nodes/vendors/GoogleGemini/actions/document/index.js +64 -0
  123. package/dist/nodes/vendors/GoogleGemini/actions/document/index.js.map +1 -0
  124. package/dist/nodes/vendors/GoogleGemini/actions/file/index.js +64 -0
  125. package/dist/nodes/vendors/GoogleGemini/actions/file/index.js.map +1 -0
  126. package/dist/nodes/vendors/GoogleGemini/actions/file/upload.operation.js +119 -0
  127. package/dist/nodes/vendors/GoogleGemini/actions/file/upload.operation.js.map +1 -0
  128. package/dist/nodes/vendors/GoogleGemini/actions/image/analyze.operation.js +125 -0
  129. package/dist/nodes/vendors/GoogleGemini/actions/image/analyze.operation.js.map +1 -0
  130. package/dist/nodes/vendors/GoogleGemini/actions/image/generate.operation.js +167 -0
  131. package/dist/nodes/vendors/GoogleGemini/actions/image/generate.operation.js.map +1 -0
  132. package/dist/nodes/vendors/GoogleGemini/actions/image/index.js +74 -0
  133. package/dist/nodes/vendors/GoogleGemini/actions/image/index.js.map +1 -0
  134. package/dist/nodes/vendors/GoogleGemini/actions/node.type.js +17 -0
  135. package/dist/nodes/vendors/GoogleGemini/actions/node.type.js.map +1 -0
  136. package/dist/nodes/vendors/GoogleGemini/actions/router.js +97 -0
  137. package/dist/nodes/vendors/GoogleGemini/actions/router.js.map +1 -0
  138. package/dist/nodes/vendors/GoogleGemini/actions/text/index.js +64 -0
  139. package/dist/nodes/vendors/GoogleGemini/actions/text/index.js.map +1 -0
  140. package/dist/nodes/vendors/GoogleGemini/actions/text/message.operation.js +339 -0
  141. package/dist/nodes/vendors/GoogleGemini/actions/text/message.operation.js.map +1 -0
  142. package/dist/nodes/vendors/GoogleGemini/actions/versionDescription.js +131 -0
  143. package/dist/nodes/vendors/GoogleGemini/actions/versionDescription.js.map +1 -0
  144. package/dist/nodes/vendors/GoogleGemini/actions/video/analyze.operation.js +125 -0
  145. package/dist/nodes/vendors/GoogleGemini/actions/video/analyze.operation.js.map +1 -0
  146. package/dist/nodes/vendors/GoogleGemini/actions/video/download.operation.js +88 -0
  147. package/dist/nodes/vendors/GoogleGemini/actions/video/download.operation.js.map +1 -0
  148. package/dist/nodes/vendors/GoogleGemini/actions/video/generate.operation.js +228 -0
  149. package/dist/nodes/vendors/GoogleGemini/actions/video/generate.operation.js.map +1 -0
  150. package/dist/nodes/vendors/GoogleGemini/actions/video/index.js +84 -0
  151. package/dist/nodes/vendors/GoogleGemini/actions/video/index.js.map +1 -0
  152. package/dist/nodes/vendors/GoogleGemini/gemini.svg +1 -0
  153. package/dist/nodes/vendors/GoogleGemini/helpers/baseAnalyze.js +100 -0
  154. package/dist/nodes/vendors/GoogleGemini/helpers/baseAnalyze.js.map +1 -0
  155. package/dist/nodes/vendors/GoogleGemini/helpers/interfaces.js +17 -0
  156. package/dist/nodes/vendors/GoogleGemini/helpers/interfaces.js.map +1 -0
  157. package/dist/nodes/vendors/GoogleGemini/helpers/utils.js +91 -0
  158. package/dist/nodes/vendors/GoogleGemini/helpers/utils.js.map +1 -0
  159. package/dist/nodes/vendors/GoogleGemini/methods/index.js +39 -0
  160. package/dist/nodes/vendors/GoogleGemini/methods/index.js.map +1 -0
  161. package/dist/nodes/vendors/GoogleGemini/methods/listSearch.js +74 -0
  162. package/dist/nodes/vendors/GoogleGemini/methods/listSearch.js.map +1 -0
  163. package/dist/nodes/vendors/GoogleGemini/transport/index.js +48 -0
  164. package/dist/nodes/vendors/GoogleGemini/transport/index.js.map +1 -0
  165. package/dist/nodes/vendors/OpenAi/actions/router.js +1 -1
  166. package/dist/nodes/vendors/OpenAi/actions/router.js.map +1 -1
  167. package/dist/types/credentials.json +3 -3
  168. package/dist/types/nodes.json +9 -5
  169. package/dist/utils/descriptions.js +13 -2
  170. package/dist/utils/descriptions.js.map +1 -1
  171. package/dist/utils/helpers.js +2 -7
  172. package/dist/utils/helpers.js.map +1 -1
  173. package/dist/utils/output_parsers/N8nOutputParser.js.map +1 -1
  174. package/package.json +11 -6
@@ -0,0 +1,84 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+ var video_exports = {};
30
+ __export(video_exports, {
31
+ analyze: () => analyze,
32
+ description: () => description,
33
+ download: () => download,
34
+ generate: () => generate
35
+ });
36
+ module.exports = __toCommonJS(video_exports);
37
+ var analyze = __toESM(require("./analyze.operation"));
38
+ var download = __toESM(require("./download.operation"));
39
+ var generate = __toESM(require("./generate.operation"));
40
+ const description = [
41
+ {
42
+ displayName: "Operation",
43
+ name: "operation",
44
+ type: "options",
45
+ noDataExpression: true,
46
+ options: [
47
+ {
48
+ name: "Analyze Video",
49
+ value: "analyze",
50
+ action: "Analyze video",
51
+ description: "Take in videos and answer questions about them"
52
+ },
53
+ {
54
+ name: "Generate a Video",
55
+ value: "generate",
56
+ action: "Generate a video",
57
+ description: "Creates a video from a text prompt"
58
+ },
59
+ {
60
+ name: "Download Video",
61
+ value: "download",
62
+ action: "Download a video",
63
+ description: "Download a generated video from the Google Gemini API using a URL"
64
+ }
65
+ ],
66
+ default: "generate",
67
+ displayOptions: {
68
+ show: {
69
+ resource: ["video"]
70
+ }
71
+ }
72
+ },
73
+ ...analyze.description,
74
+ ...download.description,
75
+ ...generate.description
76
+ ];
77
+ // Annotate the CommonJS export names for ESM import in node:
78
+ 0 && (module.exports = {
79
+ analyze,
80
+ description,
81
+ download,
82
+ generate
83
+ });
84
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../nodes/vendors/GoogleGemini/actions/video/index.ts"],"sourcesContent":["import type { INodeProperties } from 'n8n-workflow';\n\nimport * as analyze from './analyze.operation';\nimport * as download from './download.operation';\nimport * as generate from './generate.operation';\n\nexport { analyze, download, generate };\n\nexport const description: INodeProperties[] = [\n\t{\n\t\tdisplayName: 'Operation',\n\t\tname: 'operation',\n\t\ttype: 'options',\n\t\tnoDataExpression: true,\n\t\toptions: [\n\t\t\t{\n\t\t\t\tname: 'Analyze Video',\n\t\t\t\tvalue: 'analyze',\n\t\t\t\taction: 'Analyze video',\n\t\t\t\tdescription: 'Take in videos and answer questions about them',\n\t\t\t},\n\t\t\t{\n\t\t\t\tname: 'Generate a Video',\n\t\t\t\tvalue: 'generate',\n\t\t\t\taction: 'Generate a video',\n\t\t\t\tdescription: 'Creates a video from a text prompt',\n\t\t\t},\n\t\t\t{\n\t\t\t\tname: 'Download Video',\n\t\t\t\tvalue: 'download',\n\t\t\t\taction: 'Download a video',\n\t\t\t\tdescription: 'Download a generated video from the Google Gemini API using a URL',\n\t\t\t},\n\t\t],\n\t\tdefault: 'generate',\n\t\tdisplayOptions: {\n\t\t\tshow: {\n\t\t\t\tresource: ['video'],\n\t\t\t},\n\t\t},\n\t},\n\t...analyze.description,\n\t...download.description,\n\t...generate.description,\n];\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,cAAyB;AACzB,eAA0B;AAC1B,eAA0B;AAInB,MAAM,cAAiC;AAAA,EAC7C;AAAA,IACC,aAAa;AAAA,IACb,MAAM;AAAA,IACN,MAAM;AAAA,IACN,kBAAkB;AAAA,IAClB,SAAS;AAAA,MACR;AAAA,QACC,MAAM;AAAA,QACN,OAAO;AAAA,QACP,QAAQ;AAAA,QACR,aAAa;AAAA,MACd;AAAA,MACA;AAAA,QACC,MAAM;AAAA,QACN,OAAO;AAAA,QACP,QAAQ;AAAA,QACR,aAAa;AAAA,MACd;AAAA,MACA;AAAA,QACC,MAAM;AAAA,QACN,OAAO;AAAA,QACP,QAAQ;AAAA,QACR,aAAa;AAAA,MACd;AAAA,IACD;AAAA,IACA,SAAS;AAAA,IACT,gBAAgB;AAAA,MACf,MAAM;AAAA,QACL,UAAU,CAAC,OAAO;AAAA,MACnB;AAAA,IACD;AAAA,EACD;AAAA,EACA,GAAG,QAAQ;AAAA,EACX,GAAG,SAAS;AAAA,EACZ,GAAG,SAAS;AACb;","names":[]}
@@ -0,0 +1 @@
1
+ <svg class="_footerSpark_98udt_151" width="64" height="64" viewBox="0 0 64 64" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M57.0667 28.6103C52.1359 26.4878 47.8217 23.576 44.1223 19.8784C40.4247 16.1808 37.5128 11.8649 35.3902 6.9342C34.5754 5.04449 33.9206 3.10204 33.4186 1.11049C33.2549 0.459368 32.6711 0.0010376 32 0.0010376C31.3288 0.0010376 30.745 0.459368 30.5813 1.11049C30.0793 3.10204 29.4246 5.04267 28.6097 6.9342C26.4872 11.8649 23.5753 16.1808 19.8777 19.8784C16.18 23.576 11.864 26.4878 6.93327 28.6103C5.04353 29.4251 3.10105 30.0799 1.10947 30.5819C0.458338 30.7456 0 31.3294 0 32.0005C0 32.6716 0.458338 33.2555 1.10947 33.4191C3.10105 33.9211 5.04172 34.5759 6.93327 35.3907C11.864 37.5132 16.1782 40.4251 19.8777 44.1226C23.5771 47.8202 26.4872 52.1361 28.6097 57.0668C29.4246 58.9565 30.0793 60.899 30.5813 62.8905C30.745 63.5416 31.3288 64 32 64C32.6711 64 33.2549 63.5416 33.4186 62.8905C33.9206 60.899 34.5754 58.9583 35.3902 57.0668C37.5128 52.1361 40.4247 47.822 44.1223 44.1226C47.8199 40.4251 52.1359 37.5132 57.0667 35.3907C58.9564 34.5759 60.8989 33.9211 62.8905 33.4191C63.5416 33.2555 64 32.6716 64 32.0005C64 31.3294 63.5416 30.7456 62.8905 30.5819C60.8989 30.0799 58.9582 29.4251 57.0667 28.6103Z" fill="white"></path><mask id="mask0_10859_4894" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="0" y="0" width="64" height="64"><path d="M32 0C32.6711 1.144e-05 33.2553 0.458263 33.4189 1.10938C33.9209 3.10093 34.5758 5.04389 35.3906 6.93359C37.5131 11.8639 40.4247 16.1796 44.1221 19.877C47.8215 23.5745 52.1357 26.4869 57.0664 28.6094C58.958 29.4242 60.899 30.0791 62.8906 30.5811C63.5415 30.7448 63.9998 31.3281 64 31.999C64 32.6701 63.5417 33.2542 62.8906 33.418C60.899 33.9199 58.9561 34.5748 57.0664 35.3896C52.1358 37.5121 47.8196 40.4237 44.1221 44.1211C40.4246 47.8204 37.5131 52.1349 35.3906 57.0654C34.5758 58.957 33.9209 60.8981 33.4189 62.8896C33.2552 63.5407 32.6711 63.999 32 63.999C31.3289 63.999 30.7448 63.5407 30.5811 62.8896C30.0791 60.8981 29.4242 58.9551 28.6094 57.0654C26.4869 52.1349 23.5773 47.8186 19.8779 44.1211C16.1786 40.4237 11.8642 37.5121 6.93359 35.3896C5.04204 34.5748 3.10096 33.9199 1.10938 33.418C0.458309 33.2542 0 32.6701 0 31.999C0.000201548 31.3281 0.458463 30.7448 1.10938 30.5811C3.10096 30.0791 5.04386 29.4242 6.93359 28.6094C11.8643 26.4869 16.1804 23.5745 19.8779 19.877C23.5753 16.1796 26.4869 11.8639 28.6094 6.93359C29.4242 5.04207 30.0791 3.10093 30.5811 1.10938C30.7448 0.45826 31.3289 0 32 0Z" fill="black"></path><path d="M32 0C32.6711 1.144e-05 33.2553 0.458263 33.4189 1.10938C33.9209 3.10093 34.5758 5.04389 35.3906 6.93359C37.5131 11.8639 40.4247 16.1796 44.1221 19.877C47.8215 23.5745 52.1357 26.4869 57.0664 28.6094C58.958 29.4242 60.899 30.0791 62.8906 30.5811C63.5415 30.7448 63.9998 31.3281 64 31.999C64 32.6701 63.5417 33.2542 62.8906 33.418C60.899 33.9199 58.9561 34.5748 57.0664 35.3896C52.1358 37.5121 47.8196 40.4237 44.1221 44.1211C40.4246 47.8204 37.5131 52.1349 35.3906 57.0654C34.5758 58.957 33.9209 60.8981 33.4189 62.8896C33.2552 63.5407 32.6711 63.999 32 63.999C31.3289 63.999 30.7448 63.5407 30.5811 62.8896C30.0791 60.8981 29.4242 58.9551 28.6094 57.0654C26.4869 52.1349 23.5773 47.8186 19.8779 44.1211C16.1786 40.4237 11.8642 37.5121 6.93359 35.3896C5.04204 34.5748 3.10096 33.9199 1.10938 33.418C0.458309 33.2542 0 32.6701 0 31.999C0.000201548 31.3281 0.458463 30.7448 1.10938 30.5811C3.10096 30.0791 5.04386 29.4242 6.93359 28.6094C11.8643 26.4869 16.1804 23.5745 19.8779 19.877C23.5753 16.1796 26.4869 11.8639 28.6094 6.93359C29.4242 5.04207 30.0791 3.10093 30.5811 1.10938C30.7448 0.45826 31.3289 0 32 0Z" fill="url(#paint0_linear_10859_4894)"></path></mask><g mask="url(#mask0_10859_4894)"><g filter="url(#filter0_f_10859_4894)"><ellipse cx="14.2084" cy="16.7164" rx="14.2084" ry="16.7164" transform="matrix(0.942343 0.334649 -0.334656 0.94234 -7.979 13.7735)" fill="#FFE432"></ellipse></g><g filter="url(#filter1_f_10859_4894)"><ellipse cx="27.0543" cy="2.55114" rx="18.3944" ry="18.7985" fill="#FC413D"></ellipse></g><g filter="url(#filter2_f_10859_4894)"><ellipse cx="19.2245" cy="24.9042" rx="19.2245" ry="24.9042" transform="matrix(0.998807 -0.0488254 0.0488266 0.998807 -1.72778 32.6573)" fill="#00B95C"></ellipse></g><g filter="url(#filter3_f_10859_4894)"><ellipse cx="19.2245" cy="24.9042" rx="19.2245" ry="24.9042" transform="matrix(0.998807 -0.0488254 0.0488266 0.998807 -1.72778 32.6573)" fill="#00B95C"></ellipse></g><g filter="url(#filter4_f_10859_4894)"><ellipse cx="18.8429" cy="20.7441" rx="18.8429" ry="20.7441" transform="matrix(0.854301 -0.519779 0.51979 0.854294 -7.13574 47.5078)" fill="#00B95C"></ellipse></g><g filter="url(#filter5_f_10859_4894)"><ellipse cx="66.4617" cy="24.977" rx="18.0933" ry="17.4229" fill="#3186FF"></ellipse></g><g filter="url(#filter6_f_10859_4894)"><ellipse cx="20.9292" cy="22.0752" rx="20.9292" ry="22.0752" transform="matrix(0.79599 0.60531 -0.60532 0.795982 -2.81885 -7.43323)" fill="#FBBC04"></ellipse></g><g filter="url(#filter7_f_10859_4894)"><ellipse cx="24.1311" cy="22.2919" rx="24.1311" ry="22.2919" transform="matrix(0.824037 0.566536 -0.566546 0.82403 39.6338 0.310608)" fill="#3186FF"></ellipse></g><g filter="url(#filter8_f_10859_4894)"><path d="M54.2255 -2.30403C57.0195 1.49462 53.4294 8.8804 46.2068 14.1926C38.9842 19.5048 30.8642 20.7318 28.0702 16.9331C25.2762 13.1345 28.8663 5.74867 36.0889 0.436486C43.3115 -4.8757 51.4315 -6.10267 54.2255 -2.30403Z" fill="#749BFF"></path></g><g filter="url(#filter9_f_10859_4894)"><ellipse cx="27.5853" cy="17.1478" rx="27.5853" ry="17.1478" transform="matrix(0.733166 -0.680049 0.680061 0.733155 -12.2583 9.49695)" fill="#FC413D"></ellipse></g><g filter="url(#filter10_f_10859_4894)"><ellipse cx="14.7819" cy="8.59637" rx="14.7819" ry="8.59637" transform="matrix(0.813186 0.582004 -0.582016 0.813177 6.37842 30.511)" fill="#FFEE48"></ellipse></g></g><defs><filter id="filter0_f_10859_4894" x="-19.618" y="12.9027" width="38.8681" height="42.7562" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"></feBlend><feGaussianBlur stdDeviation="2.45965" result="effect1_foregroundBlur_10859_4894"></feGaussianBlur></filter><filter id="filter1_f_10859_4894" x="-15.1223" y="-40.0296" width="84.3533" height="85.1615" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"></feBlend><feGaussianBlur stdDeviation="11.8911" result="effect1_foregroundBlur_10859_4894"></feGaussianBlur></filter><filter id="filter2_f_10859_4894" x="-20.7682" y="11.4835" width="78.9161" height="90.2196" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"></feBlend><feGaussianBlur stdDeviation="10.1086" result="effect1_foregroundBlur_10859_4894"></feGaussianBlur></filter><filter id="filter3_f_10859_4894" x="-20.7682" y="11.4835" width="78.9161" height="90.2196" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"></feBlend><feGaussianBlur stdDeviation="10.1086" result="effect1_foregroundBlur_10859_4894"></feGaussianBlur></filter><filter id="filter4_f_10859_4894" x="-19.85" y="14.9664" width="79.1886" height="80.9378" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"></feBlend><feGaussianBlur stdDeviation="10.1086" result="effect1_foregroundBlur_10859_4894"></feGaussianBlur></filter><filter id="filter5_f_10859_4894" x="29.1561" y="-11.6582" width="74.6111" height="73.2703" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"></feBlend><feGaussianBlur stdDeviation="9.60613" result="effect1_foregroundBlur_10859_4894"></feGaussianBlur></filter><filter id="filter6_f_10859_4894" x="-38.291" y="-16.2687" width="77.538" height="78.1513" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"></feBlend><feGaussianBlur stdDeviation="8.70591" result="effect1_foregroundBlur_10859_4894"></feGaussianBlur></filter><filter id="filter7_f_10859_4894" x="7.78038" y="-6.0981" width="78.2181" height="76.8982" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"></feBlend><feGaussianBlur stdDeviation="7.77473" result="effect1_foregroundBlur_10859_4894"></feGaussianBlur></filter><filter id="filter8_f_10859_4894" x="13.2082" y="-18.425" width="55.8793" height="51.4791" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"></feBlend><feGaussianBlur stdDeviation="6.95694" result="effect1_foregroundBlur_10859_4894"></feGaussianBlur></filter><filter id="filter9_f_10859_4894" x="-15.4739" y="-31.0272" width="70.2034" height="68.6735" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"></feBlend><feGaussianBlur stdDeviation="5.87598" result="effect1_foregroundBlur_10859_4894"></feGaussianBlur></filter><filter id="filter10_f_10859_4894" x="-14.173" y="20.474" width="55.1373" height="51.261" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"></feBlend><feGaussianBlur stdDeviation="7.27253" result="effect1_foregroundBlur_10859_4894"></feGaussianBlur></filter><linearGradient id="paint0_linear_10859_4894" x1="18.1931" y1="42.821" x2="51.4335" y2="14.7959" gradientUnits="userSpaceOnUse"><stop stop-color="#4893FC"></stop><stop offset="0.27" stop-color="#4893FC"></stop><stop offset="0.776981" stop-color="#969DFF"></stop><stop offset="1" stop-color="#BD99FE"></stop></linearGradient></defs></svg>
@@ -0,0 +1,100 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var baseAnalyze_exports = {};
20
+ __export(baseAnalyze_exports, {
21
+ baseAnalyze: () => baseAnalyze
22
+ });
23
+ module.exports = __toCommonJS(baseAnalyze_exports);
24
+ var import_utils = require("./utils");
25
+ var import_transport = require("../transport");
26
+ async function baseAnalyze(i, urlsPropertyName, fallbackMimeType) {
27
+ const model = this.getNodeParameter("modelId", i, "", { extractValue: true });
28
+ const inputType = this.getNodeParameter("inputType", i, "url");
29
+ const text = this.getNodeParameter("text", i, "");
30
+ const simplify = this.getNodeParameter("simplify", i, true);
31
+ const options = this.getNodeParameter("options", i, {});
32
+ const generationConfig = {
33
+ maxOutputTokens: options.maxOutputTokens
34
+ };
35
+ let contents;
36
+ if (inputType === "url") {
37
+ const urls = this.getNodeParameter(urlsPropertyName, i, "");
38
+ const filesDataPromises = urls.split(",").map((url) => url.trim()).filter((url) => url).map(async (url) => {
39
+ if (url.startsWith("https://generativelanguage.googleapis.com")) {
40
+ const { mimeType } = await import_transport.apiRequest.call(this, "GET", "", {
41
+ option: { url }
42
+ });
43
+ return { fileUri: url, mimeType };
44
+ } else {
45
+ const { fileContent, mimeType } = await import_utils.downloadFile.call(this, url, fallbackMimeType);
46
+ return await import_utils.uploadFile.call(this, fileContent, mimeType);
47
+ }
48
+ });
49
+ const filesData = await Promise.all(filesDataPromises);
50
+ contents = [
51
+ {
52
+ role: "user",
53
+ parts: filesData.map((fileData) => ({
54
+ fileData
55
+ }))
56
+ }
57
+ ];
58
+ } else {
59
+ const binaryPropertyNames = this.getNodeParameter("binaryPropertyName", i, "data");
60
+ const promises = binaryPropertyNames.split(",").map((binaryPropertyName) => binaryPropertyName.trim()).filter((binaryPropertyName) => binaryPropertyName).map(async (binaryPropertyName) => {
61
+ const binaryData = this.helpers.assertBinaryData(i, binaryPropertyName);
62
+ const buffer = await this.helpers.getBinaryDataBuffer(i, binaryPropertyName);
63
+ return await import_utils.uploadFile.call(this, buffer, binaryData.mimeType);
64
+ });
65
+ const filesData = await Promise.all(promises);
66
+ contents = [
67
+ {
68
+ role: "user",
69
+ parts: filesData.map((fileData) => ({
70
+ fileData
71
+ }))
72
+ }
73
+ ];
74
+ }
75
+ contents[0].parts.push({ text });
76
+ const body = {
77
+ contents,
78
+ generationConfig
79
+ };
80
+ const response = await import_transport.apiRequest.call(this, "POST", `/v1beta/${model}:generateContent`, {
81
+ body
82
+ });
83
+ if (simplify) {
84
+ return response.candidates.map((candidate) => ({
85
+ json: candidate,
86
+ pairedItem: { item: i }
87
+ }));
88
+ }
89
+ return [
90
+ {
91
+ json: { ...response },
92
+ pairedItem: { item: i }
93
+ }
94
+ ];
95
+ }
96
+ // Annotate the CommonJS export names for ESM import in node:
97
+ 0 && (module.exports = {
98
+ baseAnalyze
99
+ });
100
+ //# sourceMappingURL=baseAnalyze.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../nodes/vendors/GoogleGemini/helpers/baseAnalyze.ts"],"sourcesContent":["import type { IExecuteFunctions, INodeExecutionData } from 'n8n-workflow';\n\nimport type { Content, GenerateContentResponse } from './interfaces';\nimport { downloadFile, uploadFile } from './utils';\nimport { apiRequest } from '../transport';\n\nexport async function baseAnalyze(\n\tthis: IExecuteFunctions,\n\ti: number,\n\turlsPropertyName: string,\n\tfallbackMimeType: string,\n): Promise<INodeExecutionData[]> {\n\tconst model = this.getNodeParameter('modelId', i, '', { extractValue: true }) as string;\n\tconst inputType = this.getNodeParameter('inputType', i, 'url') as string;\n\tconst text = this.getNodeParameter('text', i, '') as string;\n\tconst simplify = this.getNodeParameter('simplify', i, true) as boolean;\n\tconst options = this.getNodeParameter('options', i, {});\n\n\tconst generationConfig = {\n\t\tmaxOutputTokens: options.maxOutputTokens,\n\t};\n\n\tlet contents: Content[];\n\tif (inputType === 'url') {\n\t\tconst urls = this.getNodeParameter(urlsPropertyName, i, '') as string;\n\t\tconst filesDataPromises = urls\n\t\t\t.split(',')\n\t\t\t.map((url) => url.trim())\n\t\t\t.filter((url) => url)\n\t\t\t.map(async (url) => {\n\t\t\t\tif (url.startsWith('https://generativelanguage.googleapis.com')) {\n\t\t\t\t\tconst { mimeType } = (await apiRequest.call(this, 'GET', '', {\n\t\t\t\t\t\toption: { url },\n\t\t\t\t\t})) as { mimeType: string };\n\t\t\t\t\treturn { fileUri: url, mimeType };\n\t\t\t\t} else {\n\t\t\t\t\tconst { fileContent, mimeType } = await downloadFile.call(this, url, fallbackMimeType);\n\t\t\t\t\treturn await uploadFile.call(this, fileContent, mimeType);\n\t\t\t\t}\n\t\t\t});\n\n\t\tconst filesData = await Promise.all(filesDataPromises);\n\t\tcontents = [\n\t\t\t{\n\t\t\t\trole: 'user',\n\t\t\t\tparts: filesData.map((fileData) => ({\n\t\t\t\t\tfileData,\n\t\t\t\t})),\n\t\t\t},\n\t\t];\n\t} else {\n\t\tconst binaryPropertyNames = this.getNodeParameter('binaryPropertyName', i, 'data');\n\t\tconst promises = binaryPropertyNames\n\t\t\t.split(',')\n\t\t\t.map((binaryPropertyName) => binaryPropertyName.trim())\n\t\t\t.filter((binaryPropertyName) => binaryPropertyName)\n\t\t\t.map(async (binaryPropertyName) => {\n\t\t\t\tconst binaryData = this.helpers.assertBinaryData(i, binaryPropertyName);\n\t\t\t\tconst buffer = await this.helpers.getBinaryDataBuffer(i, binaryPropertyName);\n\t\t\t\treturn await uploadFile.call(this, buffer, binaryData.mimeType);\n\t\t\t});\n\n\t\tconst filesData = await Promise.all(promises);\n\t\tcontents = [\n\t\t\t{\n\t\t\t\trole: 'user',\n\t\t\t\tparts: filesData.map((fileData) => ({\n\t\t\t\t\tfileData,\n\t\t\t\t})),\n\t\t\t},\n\t\t];\n\t}\n\n\tcontents[0].parts.push({ text });\n\n\tconst body = {\n\t\tcontents,\n\t\tgenerationConfig,\n\t};\n\n\tconst response = (await apiRequest.call(this, 'POST', `/v1beta/${model}:generateContent`, {\n\t\tbody,\n\t})) as GenerateContentResponse;\n\n\tif (simplify) {\n\t\treturn response.candidates.map((candidate) => ({\n\t\t\tjson: candidate,\n\t\t\tpairedItem: { item: i },\n\t\t}));\n\t}\n\n\treturn [\n\t\t{\n\t\t\tjson: { ...response },\n\t\t\tpairedItem: { item: i },\n\t\t},\n\t];\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,mBAAyC;AACzC,uBAA2B;AAE3B,eAAsB,YAErB,GACA,kBACA,kBACgC;AAChC,QAAM,QAAQ,KAAK,iBAAiB,WAAW,GAAG,IAAI,EAAE,cAAc,KAAK,CAAC;AAC5E,QAAM,YAAY,KAAK,iBAAiB,aAAa,GAAG,KAAK;AAC7D,QAAM,OAAO,KAAK,iBAAiB,QAAQ,GAAG,EAAE;AAChD,QAAM,WAAW,KAAK,iBAAiB,YAAY,GAAG,IAAI;AAC1D,QAAM,UAAU,KAAK,iBAAiB,WAAW,GAAG,CAAC,CAAC;AAEtD,QAAM,mBAAmB;AAAA,IACxB,iBAAiB,QAAQ;AAAA,EAC1B;AAEA,MAAI;AACJ,MAAI,cAAc,OAAO;AACxB,UAAM,OAAO,KAAK,iBAAiB,kBAAkB,GAAG,EAAE;AAC1D,UAAM,oBAAoB,KACxB,MAAM,GAAG,EACT,IAAI,CAAC,QAAQ,IAAI,KAAK,CAAC,EACvB,OAAO,CAAC,QAAQ,GAAG,EACnB,IAAI,OAAO,QAAQ;AACnB,UAAI,IAAI,WAAW,2CAA2C,GAAG;AAChE,cAAM,EAAE,SAAS,IAAK,MAAM,4BAAW,KAAK,MAAM,OAAO,IAAI;AAAA,UAC5D,QAAQ,EAAE,IAAI;AAAA,QACf,CAAC;AACD,eAAO,EAAE,SAAS,KAAK,SAAS;AAAA,MACjC,OAAO;AACN,cAAM,EAAE,aAAa,SAAS,IAAI,MAAM,0BAAa,KAAK,MAAM,KAAK,gBAAgB;AACrF,eAAO,MAAM,wBAAW,KAAK,MAAM,aAAa,QAAQ;AAAA,MACzD;AAAA,IACD,CAAC;AAEF,UAAM,YAAY,MAAM,QAAQ,IAAI,iBAAiB;AACrD,eAAW;AAAA,MACV;AAAA,QACC,MAAM;AAAA,QACN,OAAO,UAAU,IAAI,CAAC,cAAc;AAAA,UACnC;AAAA,QACD,EAAE;AAAA,MACH;AAAA,IACD;AAAA,EACD,OAAO;AACN,UAAM,sBAAsB,KAAK,iBAAiB,sBAAsB,GAAG,MAAM;AACjF,UAAM,WAAW,oBACf,MAAM,GAAG,EACT,IAAI,CAAC,uBAAuB,mBAAmB,KAAK,CAAC,EACrD,OAAO,CAAC,uBAAuB,kBAAkB,EACjD,IAAI,OAAO,uBAAuB;AAClC,YAAM,aAAa,KAAK,QAAQ,iBAAiB,GAAG,kBAAkB;AACtE,YAAM,SAAS,MAAM,KAAK,QAAQ,oBAAoB,GAAG,kBAAkB;AAC3E,aAAO,MAAM,wBAAW,KAAK,MAAM,QAAQ,WAAW,QAAQ;AAAA,IAC/D,CAAC;AAEF,UAAM,YAAY,MAAM,QAAQ,IAAI,QAAQ;AAC5C,eAAW;AAAA,MACV;AAAA,QACC,MAAM;AAAA,QACN,OAAO,UAAU,IAAI,CAAC,cAAc;AAAA,UACnC;AAAA,QACD,EAAE;AAAA,MACH;AAAA,IACD;AAAA,EACD;AAEA,WAAS,CAAC,EAAE,MAAM,KAAK,EAAE,KAAK,CAAC;AAE/B,QAAM,OAAO;AAAA,IACZ;AAAA,IACA;AAAA,EACD;AAEA,QAAM,WAAY,MAAM,4BAAW,KAAK,MAAM,QAAQ,WAAW,KAAK,oBAAoB;AAAA,IACzF;AAAA,EACD,CAAC;AAED,MAAI,UAAU;AACb,WAAO,SAAS,WAAW,IAAI,CAAC,eAAe;AAAA,MAC9C,MAAM;AAAA,MACN,YAAY,EAAE,MAAM,EAAE;AAAA,IACvB,EAAE;AAAA,EACH;AAEA,SAAO;AAAA,IACN;AAAA,MACC,MAAM,EAAE,GAAG,SAAS;AAAA,MACpB,YAAY,EAAE,MAAM,EAAE;AAAA,IACvB;AAAA,EACD;AACD;","names":[]}
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from))
9
+ if (!__hasOwnProp.call(to, key) && key !== except)
10
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
+ }
12
+ return to;
13
+ };
14
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
+ var interfaces_exports = {};
16
+ module.exports = __toCommonJS(interfaces_exports);
17
+ //# sourceMappingURL=interfaces.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../nodes/vendors/GoogleGemini/helpers/interfaces.ts"],"sourcesContent":["import type { IDataObject } from 'n8n-workflow';\n\nexport interface GenerateContentResponse {\n\tcandidates: Array<{\n\t\tcontent: Content;\n\t}>;\n}\n\nexport interface Content {\n\tparts: Part[];\n\trole: string;\n}\n\nexport type Part =\n\t| { text: string }\n\t| {\n\t\t\tinlineData: {\n\t\t\t\tmimeType: string;\n\t\t\t\tdata: string;\n\t\t\t};\n\t }\n\t| {\n\t\t\tfunctionCall: {\n\t\t\t\tid?: string;\n\t\t\t\tname: string;\n\t\t\t\targs?: IDataObject;\n\t\t\t};\n\t }\n\t| {\n\t\t\tfunctionResponse: {\n\t\t\t\tid?: string;\n\t\t\t\tname: string;\n\t\t\t\tresponse: IDataObject;\n\t\t\t};\n\t }\n\t| {\n\t\t\tfileData?: {\n\t\t\t\tmimeType?: string;\n\t\t\t\tfileUri?: string;\n\t\t\t};\n\t };\n\nexport interface ImagenResponse {\n\tpredictions: Array<{\n\t\tbytesBase64Encoded: string;\n\t\tmimeType: string;\n\t}>;\n}\n\nexport interface VeoResponse {\n\tname: string;\n\tdone: boolean;\n\terror?: {\n\t\tmessage: string;\n\t};\n\tresponse: {\n\t\tgenerateVideoResponse: {\n\t\t\tgeneratedSamples: Array<{\n\t\t\t\tvideo: {\n\t\t\t\t\turi: string;\n\t\t\t\t};\n\t\t\t}>;\n\t\t};\n\t};\n}\n\nexport interface Tool {\n\tfunctionDeclarations?: Array<{\n\t\tname: string;\n\t\tdescription: string;\n\t\tparameters: IDataObject;\n\t}>;\n\tcodeExecution?: object;\n}\n"],"mappings":";;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
@@ -0,0 +1,91 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var utils_exports = {};
20
+ __export(utils_exports, {
21
+ downloadFile: () => downloadFile,
22
+ uploadFile: () => uploadFile
23
+ });
24
+ module.exports = __toCommonJS(utils_exports);
25
+ var import_n8n_workflow = require("n8n-workflow");
26
+ var import_transport = require("../transport");
27
+ async function downloadFile(url, fallbackMimeType, qs) {
28
+ const downloadResponse = await this.helpers.httpRequest({
29
+ method: "GET",
30
+ url,
31
+ qs,
32
+ returnFullResponse: true,
33
+ encoding: "arraybuffer"
34
+ });
35
+ const mimeType = downloadResponse.headers?.["content-type"]?.split(";")?.[0] ?? fallbackMimeType;
36
+ const fileContent = Buffer.from(downloadResponse.body);
37
+ return {
38
+ fileContent,
39
+ mimeType
40
+ };
41
+ }
42
+ async function uploadFile(fileContent, mimeType) {
43
+ const numBytes = fileContent.length.toString();
44
+ const uploadInitResponse = await import_transport.apiRequest.call(this, "POST", "/upload/v1beta/files", {
45
+ headers: {
46
+ "X-Goog-Upload-Protocol": "resumable",
47
+ "X-Goog-Upload-Command": "start",
48
+ "X-Goog-Upload-Header-Content-Length": numBytes,
49
+ "X-Goog-Upload-Header-Content-Type": mimeType,
50
+ "Content-Type": "application/json"
51
+ },
52
+ option: {
53
+ returnFullResponse: true
54
+ }
55
+ });
56
+ const uploadUrl = uploadInitResponse.headers["x-goog-upload-url"];
57
+ const uploadResponse = await this.helpers.httpRequest({
58
+ method: "POST",
59
+ url: uploadUrl,
60
+ headers: {
61
+ "Content-Length": numBytes,
62
+ "X-Goog-Upload-Offset": "0",
63
+ "X-Goog-Upload-Command": "upload, finalize"
64
+ },
65
+ body: fileContent
66
+ });
67
+ while (uploadResponse.file.state !== "ACTIVE" && uploadResponse.file.state !== "FAILED") {
68
+ await new Promise((resolve) => setTimeout(resolve, 1e3));
69
+ uploadResponse.file = await import_transport.apiRequest.call(
70
+ this,
71
+ "GET",
72
+ `/v1beta/${uploadResponse.file.name}`
73
+ );
74
+ }
75
+ if (uploadResponse.file.state === "FAILED") {
76
+ throw new import_n8n_workflow.NodeOperationError(
77
+ this.getNode(),
78
+ uploadResponse.file.error?.message ?? "Unknown error",
79
+ {
80
+ description: "Error uploading file"
81
+ }
82
+ );
83
+ }
84
+ return { fileUri: uploadResponse.file.uri, mimeType: uploadResponse.file.mimeType };
85
+ }
86
+ // Annotate the CommonJS export names for ESM import in node:
87
+ 0 && (module.exports = {
88
+ downloadFile,
89
+ uploadFile
90
+ });
91
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../nodes/vendors/GoogleGemini/helpers/utils.ts"],"sourcesContent":["import type { IDataObject, IExecuteFunctions } from 'n8n-workflow';\nimport { NodeOperationError } from 'n8n-workflow';\n\nimport { apiRequest } from '../transport';\n\ninterface File {\n\tname: string;\n\turi: string;\n\tmimeType: string;\n\tstate: string;\n\terror?: { message: string };\n}\n\nexport async function downloadFile(\n\tthis: IExecuteFunctions,\n\turl: string,\n\tfallbackMimeType?: string,\n\tqs?: IDataObject,\n) {\n\tconst downloadResponse = (await this.helpers.httpRequest({\n\t\tmethod: 'GET',\n\t\turl,\n\t\tqs,\n\t\treturnFullResponse: true,\n\t\tencoding: 'arraybuffer',\n\t})) as { body: ArrayBuffer; headers: IDataObject };\n\n\tconst mimeType =\n\t\t(downloadResponse.headers?.['content-type'] as string)?.split(';')?.[0] ?? fallbackMimeType;\n\tconst fileContent = Buffer.from(downloadResponse.body);\n\treturn {\n\t\tfileContent,\n\t\tmimeType,\n\t};\n}\n\nexport async function uploadFile(this: IExecuteFunctions, fileContent: Buffer, mimeType: string) {\n\tconst numBytes = fileContent.length.toString();\n\tconst uploadInitResponse = (await apiRequest.call(this, 'POST', '/upload/v1beta/files', {\n\t\theaders: {\n\t\t\t'X-Goog-Upload-Protocol': 'resumable',\n\t\t\t'X-Goog-Upload-Command': 'start',\n\t\t\t'X-Goog-Upload-Header-Content-Length': numBytes,\n\t\t\t'X-Goog-Upload-Header-Content-Type': mimeType,\n\t\t\t'Content-Type': 'application/json',\n\t\t},\n\t\toption: {\n\t\t\treturnFullResponse: true,\n\t\t},\n\t})) as { headers: IDataObject };\n\tconst uploadUrl = uploadInitResponse.headers['x-goog-upload-url'] as string;\n\n\tconst uploadResponse = (await this.helpers.httpRequest({\n\t\tmethod: 'POST',\n\t\turl: uploadUrl,\n\t\theaders: {\n\t\t\t'Content-Length': numBytes,\n\t\t\t'X-Goog-Upload-Offset': '0',\n\t\t\t'X-Goog-Upload-Command': 'upload, finalize',\n\t\t},\n\t\tbody: fileContent,\n\t})) as { file: File };\n\n\twhile (uploadResponse.file.state !== 'ACTIVE' && uploadResponse.file.state !== 'FAILED') {\n\t\tawait new Promise((resolve) => setTimeout(resolve, 1000));\n\t\tuploadResponse.file = (await apiRequest.call(\n\t\t\tthis,\n\t\t\t'GET',\n\t\t\t`/v1beta/${uploadResponse.file.name}`,\n\t\t)) as File;\n\t}\n\n\tif (uploadResponse.file.state === 'FAILED') {\n\t\tthrow new NodeOperationError(\n\t\t\tthis.getNode(),\n\t\t\tuploadResponse.file.error?.message ?? 'Unknown error',\n\t\t\t{\n\t\t\t\tdescription: 'Error uploading file',\n\t\t\t},\n\t\t);\n\t}\n\n\treturn { fileUri: uploadResponse.file.uri, mimeType: uploadResponse.file.mimeType };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,0BAAmC;AAEnC,uBAA2B;AAU3B,eAAsB,aAErB,KACA,kBACA,IACC;AACD,QAAM,mBAAoB,MAAM,KAAK,QAAQ,YAAY;AAAA,IACxD,QAAQ;AAAA,IACR;AAAA,IACA;AAAA,IACA,oBAAoB;AAAA,IACpB,UAAU;AAAA,EACX,CAAC;AAED,QAAM,WACJ,iBAAiB,UAAU,cAAc,GAAc,MAAM,GAAG,IAAI,CAAC,KAAK;AAC5E,QAAM,cAAc,OAAO,KAAK,iBAAiB,IAAI;AACrD,SAAO;AAAA,IACN;AAAA,IACA;AAAA,EACD;AACD;AAEA,eAAsB,WAAoC,aAAqB,UAAkB;AAChG,QAAM,WAAW,YAAY,OAAO,SAAS;AAC7C,QAAM,qBAAsB,MAAM,4BAAW,KAAK,MAAM,QAAQ,wBAAwB;AAAA,IACvF,SAAS;AAAA,MACR,0BAA0B;AAAA,MAC1B,yBAAyB;AAAA,MACzB,uCAAuC;AAAA,MACvC,qCAAqC;AAAA,MACrC,gBAAgB;AAAA,IACjB;AAAA,IACA,QAAQ;AAAA,MACP,oBAAoB;AAAA,IACrB;AAAA,EACD,CAAC;AACD,QAAM,YAAY,mBAAmB,QAAQ,mBAAmB;AAEhE,QAAM,iBAAkB,MAAM,KAAK,QAAQ,YAAY;AAAA,IACtD,QAAQ;AAAA,IACR,KAAK;AAAA,IACL,SAAS;AAAA,MACR,kBAAkB;AAAA,MAClB,wBAAwB;AAAA,MACxB,yBAAyB;AAAA,IAC1B;AAAA,IACA,MAAM;AAAA,EACP,CAAC;AAED,SAAO,eAAe,KAAK,UAAU,YAAY,eAAe,KAAK,UAAU,UAAU;AACxF,UAAM,IAAI,QAAQ,CAAC,YAAY,WAAW,SAAS,GAAI,CAAC;AACxD,mBAAe,OAAQ,MAAM,4BAAW;AAAA,MACvC;AAAA,MACA;AAAA,MACA,WAAW,eAAe,KAAK,IAAI;AAAA,IACpC;AAAA,EACD;AAEA,MAAI,eAAe,KAAK,UAAU,UAAU;AAC3C,UAAM,IAAI;AAAA,MACT,KAAK,QAAQ;AAAA,MACb,eAAe,KAAK,OAAO,WAAW;AAAA,MACtC;AAAA,QACC,aAAa;AAAA,MACd;AAAA,IACD;AAAA,EACD;AAEA,SAAO,EAAE,SAAS,eAAe,KAAK,KAAK,UAAU,eAAe,KAAK,SAAS;AACnF;","names":[]}
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+ var methods_exports = {};
30
+ __export(methods_exports, {
31
+ listSearch: () => listSearch
32
+ });
33
+ module.exports = __toCommonJS(methods_exports);
34
+ var listSearch = __toESM(require("./listSearch"));
35
+ // Annotate the CommonJS export names for ESM import in node:
36
+ 0 && (module.exports = {
37
+ listSearch
38
+ });
39
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../nodes/vendors/GoogleGemini/methods/index.ts"],"sourcesContent":["export * as listSearch from './listSearch';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,iBAA4B;","names":[]}
@@ -0,0 +1,74 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var listSearch_exports = {};
20
+ __export(listSearch_exports, {
21
+ audioModelSearch: () => audioModelSearch,
22
+ imageGenerationModelSearch: () => imageGenerationModelSearch,
23
+ modelSearch: () => modelSearch,
24
+ videoGenerationModelSearch: () => videoGenerationModelSearch
25
+ });
26
+ module.exports = __toCommonJS(listSearch_exports);
27
+ var import_transport = require("../transport");
28
+ async function baseModelSearch(modelFilter, filter) {
29
+ const response = await import_transport.apiRequest.call(this, "GET", "/v1beta/models", {
30
+ qs: {
31
+ pageSize: 1e3
32
+ }
33
+ });
34
+ let models = response.models.filter((model) => modelFilter(model.name));
35
+ if (filter) {
36
+ models = models.filter((model) => model.name.toLowerCase().includes(filter.toLowerCase()));
37
+ }
38
+ return {
39
+ results: models.map((model) => ({ name: model.name, value: model.name }))
40
+ };
41
+ }
42
+ async function modelSearch(filter) {
43
+ return await baseModelSearch.call(
44
+ this,
45
+ (model) => !model.includes("embedding") && !model.includes("aqa") && !model.includes("image") && !model.includes("vision") && !model.includes("veo") && !model.includes("audio") && !model.includes("tts"),
46
+ filter
47
+ );
48
+ }
49
+ async function audioModelSearch(filter) {
50
+ return await baseModelSearch.call(
51
+ this,
52
+ (model) => !model.includes("embedding") && !model.includes("aqa") && !model.includes("image") && !model.includes("vision") && !model.includes("veo") && !model.includes("tts"),
53
+ // we don't have a tts operation
54
+ filter
55
+ );
56
+ }
57
+ async function imageGenerationModelSearch(filter) {
58
+ return await baseModelSearch.call(
59
+ this,
60
+ (model) => model.includes("imagen") || model.includes("image-generation"),
61
+ filter
62
+ );
63
+ }
64
+ async function videoGenerationModelSearch(filter) {
65
+ return await baseModelSearch.call(this, (model) => model.includes("veo"), filter);
66
+ }
67
+ // Annotate the CommonJS export names for ESM import in node:
68
+ 0 && (module.exports = {
69
+ audioModelSearch,
70
+ imageGenerationModelSearch,
71
+ modelSearch,
72
+ videoGenerationModelSearch
73
+ });
74
+ //# sourceMappingURL=listSearch.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../nodes/vendors/GoogleGemini/methods/listSearch.ts"],"sourcesContent":["import type { ILoadOptionsFunctions, INodeListSearchResult } from 'n8n-workflow';\n\nimport { apiRequest } from '../transport';\n\nasync function baseModelSearch(\n\tthis: ILoadOptionsFunctions,\n\tmodelFilter: (model: string) => boolean,\n\tfilter?: string,\n): Promise<INodeListSearchResult> {\n\tconst response = (await apiRequest.call(this, 'GET', '/v1beta/models', {\n\t\tqs: {\n\t\t\tpageSize: 1000,\n\t\t},\n\t})) as {\n\t\tmodels: Array<{ name: string }>;\n\t};\n\n\tlet models = response.models.filter((model) => modelFilter(model.name));\n\tif (filter) {\n\t\tmodels = models.filter((model) => model.name.toLowerCase().includes(filter.toLowerCase()));\n\t}\n\n\treturn {\n\t\tresults: models.map((model) => ({ name: model.name, value: model.name })),\n\t};\n}\n\nexport async function modelSearch(\n\tthis: ILoadOptionsFunctions,\n\tfilter?: string,\n): Promise<INodeListSearchResult> {\n\treturn await baseModelSearch.call(\n\t\tthis,\n\t\t(model) =>\n\t\t\t!model.includes('embedding') &&\n\t\t\t!model.includes('aqa') &&\n\t\t\t!model.includes('image') &&\n\t\t\t!model.includes('vision') &&\n\t\t\t!model.includes('veo') &&\n\t\t\t!model.includes('audio') &&\n\t\t\t!model.includes('tts'),\n\t\tfilter,\n\t);\n}\n\nexport async function audioModelSearch(\n\tthis: ILoadOptionsFunctions,\n\tfilter?: string,\n): Promise<INodeListSearchResult> {\n\treturn await baseModelSearch.call(\n\t\tthis,\n\t\t(model) =>\n\t\t\t!model.includes('embedding') &&\n\t\t\t!model.includes('aqa') &&\n\t\t\t!model.includes('image') &&\n\t\t\t!model.includes('vision') &&\n\t\t\t!model.includes('veo') &&\n\t\t\t!model.includes('tts'), // we don't have a tts operation\n\t\tfilter,\n\t);\n}\n\nexport async function imageGenerationModelSearch(\n\tthis: ILoadOptionsFunctions,\n\tfilter?: string,\n): Promise<INodeListSearchResult> {\n\treturn await baseModelSearch.call(\n\t\tthis,\n\t\t(model) => model.includes('imagen') || model.includes('image-generation'),\n\t\tfilter,\n\t);\n}\n\nexport async function videoGenerationModelSearch(\n\tthis: ILoadOptionsFunctions,\n\tfilter?: string,\n): Promise<INodeListSearchResult> {\n\treturn await baseModelSearch.call(this, (model) => model.includes('veo'), filter);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,uBAA2B;AAE3B,eAAe,gBAEd,aACA,QACiC;AACjC,QAAM,WAAY,MAAM,4BAAW,KAAK,MAAM,OAAO,kBAAkB;AAAA,IACtE,IAAI;AAAA,MACH,UAAU;AAAA,IACX;AAAA,EACD,CAAC;AAID,MAAI,SAAS,SAAS,OAAO,OAAO,CAAC,UAAU,YAAY,MAAM,IAAI,CAAC;AACtE,MAAI,QAAQ;AACX,aAAS,OAAO,OAAO,CAAC,UAAU,MAAM,KAAK,YAAY,EAAE,SAAS,OAAO,YAAY,CAAC,CAAC;AAAA,EAC1F;AAEA,SAAO;AAAA,IACN,SAAS,OAAO,IAAI,CAAC,WAAW,EAAE,MAAM,MAAM,MAAM,OAAO,MAAM,KAAK,EAAE;AAAA,EACzE;AACD;AAEA,eAAsB,YAErB,QACiC;AACjC,SAAO,MAAM,gBAAgB;AAAA,IAC5B;AAAA,IACA,CAAC,UACA,CAAC,MAAM,SAAS,WAAW,KAC3B,CAAC,MAAM,SAAS,KAAK,KACrB,CAAC,MAAM,SAAS,OAAO,KACvB,CAAC,MAAM,SAAS,QAAQ,KACxB,CAAC,MAAM,SAAS,KAAK,KACrB,CAAC,MAAM,SAAS,OAAO,KACvB,CAAC,MAAM,SAAS,KAAK;AAAA,IACtB;AAAA,EACD;AACD;AAEA,eAAsB,iBAErB,QACiC;AACjC,SAAO,MAAM,gBAAgB;AAAA,IAC5B;AAAA,IACA,CAAC,UACA,CAAC,MAAM,SAAS,WAAW,KAC3B,CAAC,MAAM,SAAS,KAAK,KACrB,CAAC,MAAM,SAAS,OAAO,KACvB,CAAC,MAAM,SAAS,QAAQ,KACxB,CAAC,MAAM,SAAS,KAAK,KACrB,CAAC,MAAM,SAAS,KAAK;AAAA;AAAA,IACtB;AAAA,EACD;AACD;AAEA,eAAsB,2BAErB,QACiC;AACjC,SAAO,MAAM,gBAAgB;AAAA,IAC5B;AAAA,IACA,CAAC,UAAU,MAAM,SAAS,QAAQ,KAAK,MAAM,SAAS,kBAAkB;AAAA,IACxE;AAAA,EACD;AACD;AAEA,eAAsB,2BAErB,QACiC;AACjC,SAAO,MAAM,gBAAgB,KAAK,MAAM,CAAC,UAAU,MAAM,SAAS,KAAK,GAAG,MAAM;AACjF;","names":[]}
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var transport_exports = {};
20
+ __export(transport_exports, {
21
+ apiRequest: () => apiRequest
22
+ });
23
+ module.exports = __toCommonJS(transport_exports);
24
+ async function apiRequest(method, endpoint, parameters) {
25
+ const { body, qs, option, headers } = parameters ?? {};
26
+ const credentials = await this.getCredentials("googlePalmApi");
27
+ let url = `https://generativelanguage.googleapis.com${endpoint}`;
28
+ if (credentials.url) {
29
+ url = `${credentials?.url}${endpoint}`;
30
+ }
31
+ const options = {
32
+ headers,
33
+ method,
34
+ body,
35
+ qs,
36
+ url,
37
+ json: true
38
+ };
39
+ if (option && Object.keys(option).length !== 0) {
40
+ Object.assign(options, option);
41
+ }
42
+ return await this.helpers.httpRequestWithAuthentication.call(this, "googlePalmApi", options);
43
+ }
44
+ // Annotate the CommonJS export names for ESM import in node:
45
+ 0 && (module.exports = {
46
+ apiRequest
47
+ });
48
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../nodes/vendors/GoogleGemini/transport/index.ts"],"sourcesContent":["import type {\n\tIDataObject,\n\tIExecuteFunctions,\n\tIHttpRequestMethods,\n\tILoadOptionsFunctions,\n} from 'n8n-workflow';\n\ntype RequestParameters = {\n\theaders?: IDataObject;\n\tbody?: IDataObject | string;\n\tqs?: IDataObject;\n\toption?: IDataObject;\n};\n\nexport async function apiRequest(\n\tthis: IExecuteFunctions | ILoadOptionsFunctions,\n\tmethod: IHttpRequestMethods,\n\tendpoint: string,\n\tparameters?: RequestParameters,\n) {\n\tconst { body, qs, option, headers } = parameters ?? {};\n\n\tconst credentials = await this.getCredentials('googlePalmApi');\n\n\tlet url = `https://generativelanguage.googleapis.com${endpoint}`;\n\n\tif (credentials.url) {\n\t\turl = `${credentials?.url as string}${endpoint}`;\n\t}\n\n\tconst options = {\n\t\theaders,\n\t\tmethod,\n\t\tbody,\n\t\tqs,\n\t\turl,\n\t\tjson: true,\n\t};\n\n\tif (option && Object.keys(option).length !== 0) {\n\t\tObject.assign(options, option);\n\t}\n\n\treturn await this.helpers.httpRequestWithAuthentication.call(this, 'googlePalmApi', options);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAcA,eAAsB,WAErB,QACA,UACA,YACC;AACD,QAAM,EAAE,MAAM,IAAI,QAAQ,QAAQ,IAAI,cAAc,CAAC;AAErD,QAAM,cAAc,MAAM,KAAK,eAAe,eAAe;AAE7D,MAAI,MAAM,4CAA4C,QAAQ;AAE9D,MAAI,YAAY,KAAK;AACpB,UAAM,GAAG,aAAa,GAAa,GAAG,QAAQ;AAAA,EAC/C;AAEA,QAAM,UAAU;AAAA,IACf;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,MAAM;AAAA,EACP;AAEA,MAAI,UAAU,OAAO,KAAK,MAAM,EAAE,WAAW,GAAG;AAC/C,WAAO,OAAO,SAAS,MAAM;AAAA,EAC9B;AAEA,SAAO,MAAM,KAAK,QAAQ,8BAA8B,KAAK,MAAM,iBAAiB,OAAO;AAC5F;","names":[]}
@@ -80,7 +80,7 @@ async function router() {
80
80
  continue;
81
81
  }
82
82
  if (error instanceof import_n8n_workflow.NodeApiError) {
83
- const errorCode = error.cause.error?.error?.code;
83
+ const errorCode = error.cause?.error?.error?.code;
84
84
  if (errorCode) {
85
85
  const customErrorMessage = (0, import_error_handling.getCustomErrorMessage)(errorCode);
86
86
  if (customErrorMessage) {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../nodes/vendors/OpenAi/actions/router.ts"],"sourcesContent":["import {\n\tNodeOperationError,\n\ttype IExecuteFunctions,\n\ttype INodeExecutionData,\n\tNodeApiError,\n} from 'n8n-workflow';\n\nimport * as assistant from './assistant';\nimport * as audio from './audio';\nimport * as file from './file';\nimport * as image from './image';\nimport type { OpenAiType } from './node.type';\nimport * as text from './text';\nimport { getCustomErrorMessage } from '../helpers/error-handling';\n\nexport async function router(this: IExecuteFunctions) {\n\tconst returnData: INodeExecutionData[] = [];\n\n\tconst items = this.getInputData();\n\tconst resource = this.getNodeParameter<OpenAiType>('resource', 0);\n\tconst operation = this.getNodeParameter('operation', 0);\n\n\tconst openAiTypeData = {\n\t\tresource,\n\t\toperation,\n\t} as OpenAiType;\n\n\tlet execute;\n\tswitch (openAiTypeData.resource) {\n\t\tcase 'assistant':\n\t\t\texecute = assistant[openAiTypeData.operation].execute;\n\t\t\tbreak;\n\t\tcase 'audio':\n\t\t\texecute = audio[openAiTypeData.operation].execute;\n\t\t\tbreak;\n\t\tcase 'file':\n\t\t\texecute = file[openAiTypeData.operation].execute;\n\t\t\tbreak;\n\t\tcase 'image':\n\t\t\texecute = image[openAiTypeData.operation].execute;\n\t\t\tbreak;\n\t\tcase 'text':\n\t\t\texecute = text[openAiTypeData.operation].execute;\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tthrow new NodeOperationError(\n\t\t\t\tthis.getNode(),\n\t\t\t\t`The operation \"${operation}\" is not supported!`,\n\t\t\t);\n\t}\n\n\tfor (let i = 0; i < items.length; i++) {\n\t\ttry {\n\t\t\tconst responseData = await execute.call(this, i);\n\n\t\t\treturnData.push(...responseData);\n\t\t} catch (error) {\n\t\t\tif (this.continueOnFail()) {\n\t\t\t\treturnData.push({ json: { error: error.message }, pairedItem: { item: i } });\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (error instanceof NodeApiError) {\n\t\t\t\t// If the error is a rate limit error, we want to handle it differently\n\t\t\t\tconst errorCode: string | undefined = (error.cause as any).error?.error?.code;\n\t\t\t\tif (errorCode) {\n\t\t\t\t\tconst customErrorMessage = getCustomErrorMessage(errorCode);\n\t\t\t\t\tif (customErrorMessage) {\n\t\t\t\t\t\terror.message = customErrorMessage;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\terror.context = {\n\t\t\t\t\titemIndex: i,\n\t\t\t\t};\n\n\t\t\t\tthrow error;\n\t\t\t}\n\n\t\t\tthrow new NodeOperationError(this.getNode(), error, {\n\t\t\t\titemIndex: i,\n\t\t\t\tdescription: error.description,\n\t\t\t});\n\t\t}\n\t}\n\n\treturn [returnData];\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,0BAKO;AAEP,gBAA2B;AAC3B,YAAuB;AACvB,WAAsB;AACtB,YAAuB;AAEvB,WAAsB;AACtB,4BAAsC;AAEtC,eAAsB,SAAgC;AACrD,QAAM,aAAmC,CAAC;AAE1C,QAAM,QAAQ,KAAK,aAAa;AAChC,QAAM,WAAW,KAAK,iBAA6B,YAAY,CAAC;AAChE,QAAM,YAAY,KAAK,iBAAiB,aAAa,CAAC;AAEtD,QAAM,iBAAiB;AAAA,IACtB;AAAA,IACA;AAAA,EACD;AAEA,MAAI;AACJ,UAAQ,eAAe,UAAU;AAAA,IAChC,KAAK;AACJ,gBAAU,UAAU,eAAe,SAAS,EAAE;AAC9C;AAAA,IACD,KAAK;AACJ,gBAAU,MAAM,eAAe,SAAS,EAAE;AAC1C;AAAA,IACD,KAAK;AACJ,gBAAU,KAAK,eAAe,SAAS,EAAE;AACzC;AAAA,IACD,KAAK;AACJ,gBAAU,MAAM,eAAe,SAAS,EAAE;AAC1C;AAAA,IACD,KAAK;AACJ,gBAAU,KAAK,eAAe,SAAS,EAAE;AACzC;AAAA,IACD;AACC,YAAM,IAAI;AAAA,QACT,KAAK,QAAQ;AAAA,QACb,kBAAkB,SAAS;AAAA,MAC5B;AAAA,EACF;AAEA,WAAS,IAAI,GAAG,IAAI,MAAM,QAAQ,KAAK;AACtC,QAAI;AACH,YAAM,eAAe,MAAM,QAAQ,KAAK,MAAM,CAAC;AAE/C,iBAAW,KAAK,GAAG,YAAY;AAAA,IAChC,SAAS,OAAO;AACf,UAAI,KAAK,eAAe,GAAG;AAC1B,mBAAW,KAAK,EAAE,MAAM,EAAE,OAAO,MAAM,QAAQ,GAAG,YAAY,EAAE,MAAM,EAAE,EAAE,CAAC;AAC3E;AAAA,MACD;AAEA,UAAI,iBAAiB,kCAAc;AAElC,cAAM,YAAiC,MAAM,MAAc,OAAO,OAAO;AACzE,YAAI,WAAW;AACd,gBAAM,yBAAqB,6CAAsB,SAAS;AAC1D,cAAI,oBAAoB;AACvB,kBAAM,UAAU;AAAA,UACjB;AAAA,QACD;AAEA,cAAM,UAAU;AAAA,UACf,WAAW;AAAA,QACZ;AAEA,cAAM;AAAA,MACP;AAEA,YAAM,IAAI,uCAAmB,KAAK,QAAQ,GAAG,OAAO;AAAA,QACnD,WAAW;AAAA,QACX,aAAa,MAAM;AAAA,MACpB,CAAC;AAAA,IACF;AAAA,EACD;AAEA,SAAO,CAAC,UAAU;AACnB;","names":[]}
1
+ {"version":3,"sources":["../../../../../nodes/vendors/OpenAi/actions/router.ts"],"sourcesContent":["import {\n\tNodeOperationError,\n\ttype IExecuteFunctions,\n\ttype INodeExecutionData,\n\tNodeApiError,\n} from 'n8n-workflow';\n\nimport * as assistant from './assistant';\nimport * as audio from './audio';\nimport * as file from './file';\nimport * as image from './image';\nimport type { OpenAiType } from './node.type';\nimport * as text from './text';\nimport { getCustomErrorMessage } from '../helpers/error-handling';\n\nexport async function router(this: IExecuteFunctions) {\n\tconst returnData: INodeExecutionData[] = [];\n\n\tconst items = this.getInputData();\n\tconst resource = this.getNodeParameter<OpenAiType>('resource', 0);\n\tconst operation = this.getNodeParameter('operation', 0);\n\n\tconst openAiTypeData = {\n\t\tresource,\n\t\toperation,\n\t} as OpenAiType;\n\n\tlet execute;\n\tswitch (openAiTypeData.resource) {\n\t\tcase 'assistant':\n\t\t\texecute = assistant[openAiTypeData.operation].execute;\n\t\t\tbreak;\n\t\tcase 'audio':\n\t\t\texecute = audio[openAiTypeData.operation].execute;\n\t\t\tbreak;\n\t\tcase 'file':\n\t\t\texecute = file[openAiTypeData.operation].execute;\n\t\t\tbreak;\n\t\tcase 'image':\n\t\t\texecute = image[openAiTypeData.operation].execute;\n\t\t\tbreak;\n\t\tcase 'text':\n\t\t\texecute = text[openAiTypeData.operation].execute;\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tthrow new NodeOperationError(\n\t\t\t\tthis.getNode(),\n\t\t\t\t`The operation \"${operation}\" is not supported!`,\n\t\t\t);\n\t}\n\n\tfor (let i = 0; i < items.length; i++) {\n\t\ttry {\n\t\t\tconst responseData = await execute.call(this, i);\n\n\t\t\treturnData.push(...responseData);\n\t\t} catch (error) {\n\t\t\tif (this.continueOnFail()) {\n\t\t\t\treturnData.push({ json: { error: error.message }, pairedItem: { item: i } });\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (error instanceof NodeApiError) {\n\t\t\t\t// If the error is a rate limit error, we want to handle it differently\n\t\t\t\tconst errorCode: string | undefined = (error.cause as any)?.error?.error?.code;\n\t\t\t\tif (errorCode) {\n\t\t\t\t\tconst customErrorMessage = getCustomErrorMessage(errorCode);\n\t\t\t\t\tif (customErrorMessage) {\n\t\t\t\t\t\terror.message = customErrorMessage;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\terror.context = {\n\t\t\t\t\titemIndex: i,\n\t\t\t\t};\n\n\t\t\t\tthrow error;\n\t\t\t}\n\n\t\t\tthrow new NodeOperationError(this.getNode(), error, {\n\t\t\t\titemIndex: i,\n\t\t\t\tdescription: error.description,\n\t\t\t});\n\t\t}\n\t}\n\n\treturn [returnData];\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,0BAKO;AAEP,gBAA2B;AAC3B,YAAuB;AACvB,WAAsB;AACtB,YAAuB;AAEvB,WAAsB;AACtB,4BAAsC;AAEtC,eAAsB,SAAgC;AACrD,QAAM,aAAmC,CAAC;AAE1C,QAAM,QAAQ,KAAK,aAAa;AAChC,QAAM,WAAW,KAAK,iBAA6B,YAAY,CAAC;AAChE,QAAM,YAAY,KAAK,iBAAiB,aAAa,CAAC;AAEtD,QAAM,iBAAiB;AAAA,IACtB;AAAA,IACA;AAAA,EACD;AAEA,MAAI;AACJ,UAAQ,eAAe,UAAU;AAAA,IAChC,KAAK;AACJ,gBAAU,UAAU,eAAe,SAAS,EAAE;AAC9C;AAAA,IACD,KAAK;AACJ,gBAAU,MAAM,eAAe,SAAS,EAAE;AAC1C;AAAA,IACD,KAAK;AACJ,gBAAU,KAAK,eAAe,SAAS,EAAE;AACzC;AAAA,IACD,KAAK;AACJ,gBAAU,MAAM,eAAe,SAAS,EAAE;AAC1C;AAAA,IACD,KAAK;AACJ,gBAAU,KAAK,eAAe,SAAS,EAAE;AACzC;AAAA,IACD;AACC,YAAM,IAAI;AAAA,QACT,KAAK,QAAQ;AAAA,QACb,kBAAkB,SAAS;AAAA,MAC5B;AAAA,EACF;AAEA,WAAS,IAAI,GAAG,IAAI,MAAM,QAAQ,KAAK;AACtC,QAAI;AACH,YAAM,eAAe,MAAM,QAAQ,KAAK,MAAM,CAAC;AAE/C,iBAAW,KAAK,GAAG,YAAY;AAAA,IAChC,SAAS,OAAO;AACf,UAAI,KAAK,eAAe,GAAG;AAC1B,mBAAW,KAAK,EAAE,MAAM,EAAE,OAAO,MAAM,QAAQ,GAAG,YAAY,EAAE,MAAM,EAAE,EAAE,CAAC;AAC3E;AAAA,MACD;AAEA,UAAI,iBAAiB,kCAAc;AAElC,cAAM,YAAiC,MAAM,OAAe,OAAO,OAAO;AAC1E,YAAI,WAAW;AACd,gBAAM,yBAAqB,6CAAsB,SAAS;AAC1D,cAAI,oBAAoB;AACvB,kBAAM,UAAU;AAAA,UACjB;AAAA,QACD;AAEA,cAAM,UAAU;AAAA,UACf,WAAW;AAAA,QACZ;AAEA,cAAM;AAAA,MACP;AAEA,YAAM,IAAI,uCAAmB,KAAK,QAAQ,GAAG,OAAO;AAAA,QACnD,WAAW;AAAA,QACX,aAAa,MAAM;AAAA,MACpB,CAAC;AAAA,IACF;AAAA,EACD;AAEA,SAAO,CAAC,UAAU;AACnB;","names":[]}
@@ -1,10 +1,10 @@
1
1
  [
2
- {"name":"anthropicApi","displayName":"Anthropic","documentationUrl":"anthropic","properties":[{"displayName":"API Key","name":"apiKey","type":"string","typeOptions":{"password":true},"required":true,"default":""},{"displayName":"Base URL","name":"url","type":"string","default":"https://api.anthropic.com","description":"Override the default base URL for the API"}],"authenticate":{"type":"generic","properties":{"headers":{"x-api-key":"={{$credentials.apiKey}}"}}},"test":{"request":{"baseURL":"={{$credentials?.url}}","url":"/v1/messages","method":"POST","headers":{"anthropic-version":"2023-06-01"},"body":{"model":"claude-3-haiku-20240307","messages":[{"role":"user","content":"Hey"}],"max_tokens":1}}},"supportedNodes":["lmChatAnthropic"],"iconUrl":"icons/@n8n/n8n-nodes-langchain/dist/nodes/llms/LMChatAnthropic/anthropic.svg"},
2
+ {"name":"anthropicApi","displayName":"Anthropic","documentationUrl":"anthropic","properties":[{"displayName":"API Key","name":"apiKey","type":"string","typeOptions":{"password":true},"required":true,"default":""},{"displayName":"Base URL","name":"url","type":"string","default":"https://api.anthropic.com","description":"Override the default base URL for the API"}],"authenticate":{"type":"generic","properties":{"headers":{"x-api-key":"={{$credentials.apiKey}}"}}},"test":{"request":{"baseURL":"={{$credentials?.url}}","url":"/v1/messages","method":"POST","headers":{"anthropic-version":"2023-06-01"},"body":{"model":"claude-3-haiku-20240307","messages":[{"role":"user","content":"Hey"}],"max_tokens":1}}},"supportedNodes":["anthropic","lmChatAnthropic"],"iconUrl":"icons/@n8n/n8n-nodes-langchain/dist/nodes/vendors/Anthropic/anthropic.svg"},
3
3
  {"name":"azureOpenAiApi","displayName":"Azure Open AI","documentationUrl":"azureopenai","properties":[{"displayName":"API Key","name":"apiKey","type":"string","typeOptions":{"password":true},"required":true,"default":""},{"displayName":"Resource Name","name":"resourceName","type":"string","required":true,"default":""},{"displayName":"API Version","name":"apiVersion","type":"string","required":true,"default":"2025-03-01-preview"},{"displayName":"Endpoint","name":"endpoint","type":"string","placeholder":"https://westeurope.api.cognitive.microsoft.com"}],"authenticate":{"type":"generic","properties":{"headers":{"api-key":"={{$credentials.apiKey}}"}}},"supportedNodes":["embeddingsAzureOpenAi","lmChatAzureOpenAi"],"iconUrl":"icons/@n8n/n8n-nodes-langchain/dist/nodes/embeddings/EmbeddingsAzureOpenAi/azure.svg"},
4
4
  {"name":"azureEntraCognitiveServicesOAuth2Api","displayName":"Azure Entra ID (Azure Active Directory) API","extends":["oAuth2Api"],"documentationUrl":"azureEntraCognitiveServicesOAuth2Api","properties":[{"displayName":"Grant Type","name":"grantType","type":"hidden","default":"authorizationCode"},{"displayName":"Resource Name","name":"resourceName","type":"string","required":true,"default":""},{"displayName":"API Version","name":"apiVersion","type":"string","required":true,"default":"2025-03-01-preview"},{"displayName":"Endpoint","name":"endpoint","type":"string","placeholder":"https://westeurope.api.cognitive.microsoft.com"},{"displayName":"Tenant ID","name":"tenantId","type":"string","default":"common","description":"Enter your Azure Tenant ID (Directory ID) or keep \"common\" for multi-tenant apps. Using a specific Tenant ID is generally recommended and required for certain authentication flows.","placeholder":"e.g., xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx or common"},{"displayName":"Authorization URL","name":"authUrl","type":"hidden","default":"=https://login.microsoftonline.com/{{$self[\"tenantId\"]}}/oauth2/authorize"},{"displayName":"Access Token URL","name":"accessTokenUrl","type":"hidden","default":"=https://login.microsoftonline.com/{{$self[\"tenantId\"]}}/oauth2/token"},{"displayName":"Additional Body Properties","name":"additionalBodyProperties","type":"hidden","default":"{\"grant_type\": \"client_credentials\", \"resource\": \"https://cognitiveservices.azure.com/\"}"},{"displayName":"Authentication","name":"authentication","type":"hidden","default":"body"},{"displayName":"Custom Scopes","name":"customScopes","type":"boolean","default":false,"description":"Define custom scopes. You might need this if the default scopes are not sufficient or if you want to minimize permissions. Ensure you include \"openid\" and \"offline_access\"."},{"displayName":"Auth URI Query Parameters","name":"authQueryParameters","type":"hidden","default":"","description":"For some services additional query parameters have to be set which can be defined here","placeholder":""},{"displayName":"Enabled Scopes","name":"enabledScopes","type":"string","displayOptions":{"show":{"customScopes":[true]}},"default":"openid offline_access","placeholder":"openid offline_access","description":"Space-separated list of scopes to request."},{"displayName":"Scope","name":"scope","type":"hidden","default":"={{ $self.customScopes ? $self.enabledScopes : \"openid offline_access\"}}"}],"supportedNodes":["lmChatAzureOpenAi"],"iconUrl":"icons/@n8n/n8n-nodes-langchain/dist/nodes/llms/LmChatAzureOpenAi/azure.svg"},
5
- {"name":"cohereApi","displayName":"CohereApi","documentationUrl":"cohere","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.cohere.ai","url":"/v1/models?page_size=1"}},"supportedNodes":["embeddingsCohere","lmCohere","rerankerCohere"],"iconUrl":{"light":"icons/@n8n/n8n-nodes-langchain/dist/nodes/embeddings/EmbeddingsCohere/cohere.svg","dark":"icons/@n8n/n8n-nodes-langchain/dist/nodes/embeddings/EmbeddingsCohere/cohere.dark.svg"}},
5
+ {"name":"cohereApi","displayName":"CohereApi","documentationUrl":"cohere","properties":[{"displayName":"API Key","name":"apiKey","type":"string","typeOptions":{"password":true},"required":true,"default":""},{"displayName":"Base URL","name":"url","type":"hidden","default":"https://api.cohere.ai"}],"authenticate":{"type":"generic","properties":{"headers":{"Authorization":"=Bearer {{$credentials.apiKey}}"}}},"test":{"request":{"baseURL":"={{ $credentials.url }}","url":"/v1/models?page_size=1"}},"supportedNodes":["embeddingsCohere","lmChatCohere","lmCohere","rerankerCohere"],"iconUrl":{"light":"icons/@n8n/n8n-nodes-langchain/dist/nodes/embeddings/EmbeddingsCohere/cohere.svg","dark":"icons/@n8n/n8n-nodes-langchain/dist/nodes/embeddings/EmbeddingsCohere/cohere.dark.svg"}},
6
6
  {"name":"deepSeekApi","displayName":"DeepSeek","documentationUrl":"deepseek","properties":[{"displayName":"API Key","name":"apiKey","type":"string","typeOptions":{"password":true},"required":true,"default":""},{"displayName":"Base URL","name":"url","type":"hidden","default":"https://api.deepseek.com"}],"authenticate":{"type":"generic","properties":{"headers":{"Authorization":"=Bearer {{$credentials.apiKey}}"}}},"test":{"request":{"baseURL":"={{ $credentials.url }}","url":"/models"}},"supportedNodes":["lmChatDeepSeek"],"iconUrl":"icons/@n8n/n8n-nodes-langchain/dist/nodes/llms/LmChatDeepSeek/deepseek.svg"},
7
- {"name":"googlePalmApi","displayName":"Google Gemini(PaLM) Api","documentationUrl":"google","properties":[{"displayName":"Host","name":"host","required":true,"type":"string","default":"https://generativelanguage.googleapis.com"},{"displayName":"API Key","name":"apiKey","type":"string","typeOptions":{"password":true},"required":true,"default":""}],"authenticate":{"type":"generic","properties":{"qs":{"key":"={{$credentials.apiKey}}"}}},"test":{"request":{"baseURL":"={{$credentials.host}}/v1beta/models"}},"supportedNodes":["embeddingsGoogleGemini","lmChatGoogleGemini"],"iconUrl":"icons/@n8n/n8n-nodes-langchain/dist/nodes/embeddings/EmbeddingsGoogleGemini/google.svg"},
7
+ {"name":"googlePalmApi","displayName":"Google Gemini(PaLM) Api","documentationUrl":"google","properties":[{"displayName":"Host","name":"host","required":true,"type":"string","default":"https://generativelanguage.googleapis.com"},{"displayName":"API Key","name":"apiKey","type":"string","typeOptions":{"password":true},"required":true,"default":""}],"authenticate":{"type":"generic","properties":{"qs":{"key":"={{$credentials.apiKey}}"}}},"test":{"request":{"baseURL":"={{$credentials.host}}/v1beta/models"}},"supportedNodes":["googleGemini","embeddingsGoogleGemini","lmChatGoogleGemini"],"iconUrl":"icons/@n8n/n8n-nodes-langchain/dist/nodes/vendors/GoogleGemini/gemini.svg"},
8
8
  {"name":"groqApi","displayName":"Groq","documentationUrl":"groq","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.groq.com/openai/v1","url":"/models"}},"supportedNodes":["lmChatGroq"],"iconUrl":"icons/@n8n/n8n-nodes-langchain/dist/nodes/llms/LmChatGroq/groq.svg"},
9
9
  {"name":"huggingFaceApi","displayName":"HuggingFaceApi","documentationUrl":"huggingface","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-inference.huggingface.co","url":"/models/gpt2"}},"supportedNodes":["embeddingsHuggingFaceInference","lmOpenHuggingFaceInference"],"iconUrl":"icons/@n8n/n8n-nodes-langchain/dist/nodes/embeddings/EmbeddingsHuggingFaceInference/huggingface.svg"},
10
10
  {"name":"motorheadApi","displayName":"MotorheadApi","documentationUrl":"motorhead","properties":[{"displayName":"Host","name":"host","required":true,"type":"string","default":"https://api.getmetal.io/v1"},{"displayName":"API Key","name":"apiKey","type":"string","typeOptions":{"password":true},"required":true,"default":""},{"displayName":"Client ID","name":"clientId","type":"string","default":""}],"authenticate":{"type":"generic","properties":{"headers":{"x-metal-client-id":"={{$credentials.clientId}}","x-metal-api-key":"={{$credentials.apiKey}}"}}},"test":{"request":{"baseURL":"={{$credentials.host}}/keys/current"}},"supportedNodes":["memoryMotorhead"],"icon":"fa:file-export","iconColor":"black"},