@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,125 @@
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 analyze_operation_exports = {};
20
+ __export(analyze_operation_exports, {
21
+ description: () => description,
22
+ execute: () => execute
23
+ });
24
+ module.exports = __toCommonJS(analyze_operation_exports);
25
+ var import_n8n_workflow = require("n8n-workflow");
26
+ var import_baseAnalyze = require("../../helpers/baseAnalyze");
27
+ var import_descriptions = require("../descriptions");
28
+ const properties = [
29
+ (0, import_descriptions.modelRLC)("audioModelSearch"),
30
+ {
31
+ displayName: "Text Input",
32
+ name: "text",
33
+ type: "string",
34
+ placeholder: "e.g. What's in this audio?",
35
+ default: "What's in this audio?",
36
+ typeOptions: {
37
+ rows: 2
38
+ }
39
+ },
40
+ {
41
+ displayName: "Input Type",
42
+ name: "inputType",
43
+ type: "options",
44
+ default: "url",
45
+ options: [
46
+ {
47
+ name: "Audio URL(s)",
48
+ value: "url"
49
+ },
50
+ {
51
+ name: "Binary File(s)",
52
+ value: "binary"
53
+ }
54
+ ]
55
+ },
56
+ {
57
+ displayName: "URL(s)",
58
+ name: "audioUrls",
59
+ type: "string",
60
+ placeholder: "e.g. https://example.com/audio.mp3",
61
+ description: "URL(s) of the audio(s) to analyze, multiple URLs can be added separated by comma",
62
+ default: "",
63
+ displayOptions: {
64
+ show: {
65
+ inputType: ["url"]
66
+ }
67
+ }
68
+ },
69
+ {
70
+ displayName: "Input Data Field Name(s)",
71
+ name: "binaryPropertyName",
72
+ type: "string",
73
+ default: "data",
74
+ placeholder: "e.g. data",
75
+ hint: "The name of the input field containing the binary file data to be processed",
76
+ description: "Name of the binary field(s) which contains the audio(s), seperate multiple field names with commas",
77
+ displayOptions: {
78
+ show: {
79
+ inputType: ["binary"]
80
+ }
81
+ }
82
+ },
83
+ {
84
+ displayName: "Simplify Output",
85
+ name: "simplify",
86
+ type: "boolean",
87
+ default: true,
88
+ description: "Whether to simplify the response or not"
89
+ },
90
+ {
91
+ displayName: "Options",
92
+ name: "options",
93
+ placeholder: "Add Option",
94
+ type: "collection",
95
+ default: {},
96
+ options: [
97
+ {
98
+ displayName: "Length of Description (Max Tokens)",
99
+ description: "Fewer tokens will result in shorter, less detailed audio description",
100
+ name: "maxOutputTokens",
101
+ type: "number",
102
+ default: 300,
103
+ typeOptions: {
104
+ minValue: 1
105
+ }
106
+ }
107
+ ]
108
+ }
109
+ ];
110
+ const displayOptions = {
111
+ show: {
112
+ operation: ["analyze"],
113
+ resource: ["audio"]
114
+ }
115
+ };
116
+ const description = (0, import_n8n_workflow.updateDisplayOptions)(displayOptions, properties);
117
+ async function execute(i) {
118
+ return await import_baseAnalyze.baseAnalyze.call(this, i, "audioUrls", "audio/mpeg");
119
+ }
120
+ // Annotate the CommonJS export names for ESM import in node:
121
+ 0 && (module.exports = {
122
+ description,
123
+ execute
124
+ });
125
+ //# sourceMappingURL=analyze.operation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../nodes/vendors/GoogleGemini/actions/audio/analyze.operation.ts"],"sourcesContent":["import type { IExecuteFunctions, INodeExecutionData, INodeProperties } from 'n8n-workflow';\nimport { updateDisplayOptions } from 'n8n-workflow';\n\nimport { baseAnalyze } from '../../helpers/baseAnalyze';\nimport { modelRLC } from '../descriptions';\n\nconst properties: INodeProperties[] = [\n\tmodelRLC('audioModelSearch'),\n\t{\n\t\tdisplayName: 'Text Input',\n\t\tname: 'text',\n\t\ttype: 'string',\n\t\tplaceholder: \"e.g. What's in this audio?\",\n\t\tdefault: \"What's in this audio?\",\n\t\ttypeOptions: {\n\t\t\trows: 2,\n\t\t},\n\t},\n\t{\n\t\tdisplayName: 'Input Type',\n\t\tname: 'inputType',\n\t\ttype: 'options',\n\t\tdefault: 'url',\n\t\toptions: [\n\t\t\t{\n\t\t\t\tname: 'Audio URL(s)',\n\t\t\t\tvalue: 'url',\n\t\t\t},\n\t\t\t{\n\t\t\t\tname: 'Binary File(s)',\n\t\t\t\tvalue: 'binary',\n\t\t\t},\n\t\t],\n\t},\n\t{\n\t\tdisplayName: 'URL(s)',\n\t\tname: 'audioUrls',\n\t\ttype: 'string',\n\t\tplaceholder: 'e.g. https://example.com/audio.mp3',\n\t\tdescription: 'URL(s) of the audio(s) to analyze, multiple URLs can be added separated by comma',\n\t\tdefault: '',\n\t\tdisplayOptions: {\n\t\t\tshow: {\n\t\t\t\tinputType: ['url'],\n\t\t\t},\n\t\t},\n\t},\n\t{\n\t\tdisplayName: 'Input Data Field Name(s)',\n\t\tname: 'binaryPropertyName',\n\t\ttype: 'string',\n\t\tdefault: 'data',\n\t\tplaceholder: 'e.g. data',\n\t\thint: 'The name of the input field containing the binary file data to be processed',\n\t\tdescription:\n\t\t\t'Name of the binary field(s) which contains the audio(s), seperate multiple field names with commas',\n\t\tdisplayOptions: {\n\t\t\tshow: {\n\t\t\t\tinputType: ['binary'],\n\t\t\t},\n\t\t},\n\t},\n\t{\n\t\tdisplayName: 'Simplify Output',\n\t\tname: 'simplify',\n\t\ttype: 'boolean',\n\t\tdefault: true,\n\t\tdescription: 'Whether to simplify the response or not',\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: 'Length of Description (Max Tokens)',\n\t\t\t\tdescription: 'Fewer tokens will result in shorter, less detailed audio description',\n\t\t\t\tname: 'maxOutputTokens',\n\t\t\t\ttype: 'number',\n\t\t\t\tdefault: 300,\n\t\t\t\ttypeOptions: {\n\t\t\t\t\tminValue: 1,\n\t\t\t\t},\n\t\t\t},\n\t\t],\n\t},\n];\n\nconst displayOptions = {\n\tshow: {\n\t\toperation: ['analyze'],\n\t\tresource: ['audio'],\n\t},\n};\n\nexport const description = updateDisplayOptions(displayOptions, properties);\n\nexport async function execute(this: IExecuteFunctions, i: number): Promise<INodeExecutionData[]> {\n\treturn await baseAnalyze.call(this, i, 'audioUrls', 'audio/mpeg');\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,0BAAqC;AAErC,yBAA4B;AAC5B,0BAAyB;AAEzB,MAAM,aAAgC;AAAA,MACrC,8BAAS,kBAAkB;AAAA,EAC3B;AAAA,IACC,aAAa;AAAA,IACb,MAAM;AAAA,IACN,MAAM;AAAA,IACN,aAAa;AAAA,IACb,SAAS;AAAA,IACT,aAAa;AAAA,MACZ,MAAM;AAAA,IACP;AAAA,EACD;AAAA,EACA;AAAA,IACC,aAAa;AAAA,IACb,MAAM;AAAA,IACN,MAAM;AAAA,IACN,SAAS;AAAA,IACT,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,aAAa;AAAA,IACb,SAAS;AAAA,IACT,gBAAgB;AAAA,MACf,MAAM;AAAA,QACL,WAAW,CAAC,KAAK;AAAA,MAClB;AAAA,IACD;AAAA,EACD;AAAA,EACA;AAAA,IACC,aAAa;AAAA,IACb,MAAM;AAAA,IACN,MAAM;AAAA,IACN,SAAS;AAAA,IACT,aAAa;AAAA,IACb,MAAM;AAAA,IACN,aACC;AAAA,IACD,gBAAgB;AAAA,MACf,MAAM;AAAA,QACL,WAAW,CAAC,QAAQ;AAAA,MACrB;AAAA,IACD;AAAA,EACD;AAAA,EACA;AAAA,IACC,aAAa;AAAA,IACb,MAAM;AAAA,IACN,MAAM;AAAA,IACN,SAAS;AAAA,IACT,aAAa;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,aAAa;AAAA,QACb,MAAM;AAAA,QACN,MAAM;AAAA,QACN,SAAS;AAAA,QACT,aAAa;AAAA,UACZ,UAAU;AAAA,QACX;AAAA,MACD;AAAA,IACD;AAAA,EACD;AACD;AAEA,MAAM,iBAAiB;AAAA,EACtB,MAAM;AAAA,IACL,WAAW,CAAC,SAAS;AAAA,IACrB,UAAU,CAAC,OAAO;AAAA,EACnB;AACD;AAEO,MAAM,kBAAc,0CAAqB,gBAAgB,UAAU;AAE1E,eAAsB,QAAiC,GAA0C;AAChG,SAAO,MAAM,+BAAY,KAAK,MAAM,GAAG,aAAa,YAAY;AACjE;","names":[]}
@@ -0,0 +1,74 @@
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 audio_exports = {};
30
+ __export(audio_exports, {
31
+ analyze: () => analyze,
32
+ description: () => description,
33
+ transcribe: () => transcribe
34
+ });
35
+ module.exports = __toCommonJS(audio_exports);
36
+ var analyze = __toESM(require("./analyze.operation"));
37
+ var transcribe = __toESM(require("./transcribe.operation"));
38
+ const description = [
39
+ {
40
+ displayName: "Operation",
41
+ name: "operation",
42
+ type: "options",
43
+ noDataExpression: true,
44
+ options: [
45
+ {
46
+ name: "Analyze Audio",
47
+ value: "analyze",
48
+ action: "Analyze audio",
49
+ description: "Take in audio and answer questions about it"
50
+ },
51
+ {
52
+ name: "Transcribe a Recording",
53
+ value: "transcribe",
54
+ action: "Transcribe a recording",
55
+ description: "Transcribes audio into the text"
56
+ }
57
+ ],
58
+ default: "transcribe",
59
+ displayOptions: {
60
+ show: {
61
+ resource: ["audio"]
62
+ }
63
+ }
64
+ },
65
+ ...analyze.description,
66
+ ...transcribe.description
67
+ ];
68
+ // Annotate the CommonJS export names for ESM import in node:
69
+ 0 && (module.exports = {
70
+ analyze,
71
+ description,
72
+ transcribe
73
+ });
74
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../nodes/vendors/GoogleGemini/actions/audio/index.ts"],"sourcesContent":["import type { INodeProperties } from 'n8n-workflow';\n\nimport * as analyze from './analyze.operation';\nimport * as transcribe from './transcribe.operation';\n\nexport { analyze, transcribe };\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 Audio',\n\t\t\t\tvalue: 'analyze',\n\t\t\t\taction: 'Analyze audio',\n\t\t\t\tdescription: 'Take in audio and answer questions about it',\n\t\t\t},\n\t\t\t{\n\t\t\t\tname: 'Transcribe a Recording',\n\t\t\t\tvalue: 'transcribe',\n\t\t\t\taction: 'Transcribe a recording',\n\t\t\t\tdescription: 'Transcribes audio into the text',\n\t\t\t},\n\t\t],\n\t\tdefault: 'transcribe',\n\t\tdisplayOptions: {\n\t\t\tshow: {\n\t\t\t\tresource: ['audio'],\n\t\t\t},\n\t\t},\n\t},\n\t...analyze.description,\n\t...transcribe.description,\n];\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,cAAyB;AACzB,iBAA4B;AAIrB,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,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,WAAW;AACf;","names":[]}
@@ -0,0 +1,184 @@
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 transcribe_operation_exports = {};
20
+ __export(transcribe_operation_exports, {
21
+ description: () => description,
22
+ execute: () => execute
23
+ });
24
+ module.exports = __toCommonJS(transcribe_operation_exports);
25
+ var import_n8n_workflow = require("n8n-workflow");
26
+ var import_utils = require("../../helpers/utils");
27
+ var import_transport = require("../../transport");
28
+ var import_descriptions = require("../descriptions");
29
+ const properties = [
30
+ (0, import_descriptions.modelRLC)("audioModelSearch"),
31
+ {
32
+ displayName: "Input Type",
33
+ name: "inputType",
34
+ type: "options",
35
+ default: "url",
36
+ options: [
37
+ {
38
+ name: "Audio URL(s)",
39
+ value: "url"
40
+ },
41
+ {
42
+ name: "Binary File(s)",
43
+ value: "binary"
44
+ }
45
+ ]
46
+ },
47
+ {
48
+ displayName: "URL(s)",
49
+ name: "audioUrls",
50
+ type: "string",
51
+ placeholder: "e.g. https://example.com/audio.mp3",
52
+ description: "URL(s) of the audio(s) to transcribe, multiple URLs can be added separated by comma",
53
+ default: "",
54
+ displayOptions: {
55
+ show: {
56
+ inputType: ["url"]
57
+ }
58
+ }
59
+ },
60
+ {
61
+ displayName: "Input Data Field Name(s)",
62
+ name: "binaryPropertyName",
63
+ type: "string",
64
+ default: "data",
65
+ placeholder: "e.g. data",
66
+ hint: "The name of the input field containing the binary file data to be processed",
67
+ description: "Name of the binary field(s) which contains the audio(s), seperate multiple field names with commas",
68
+ displayOptions: {
69
+ show: {
70
+ inputType: ["binary"]
71
+ }
72
+ }
73
+ },
74
+ {
75
+ displayName: "Simplify Output",
76
+ name: "simplify",
77
+ type: "boolean",
78
+ default: true,
79
+ description: "Whether to simplify the response or not"
80
+ },
81
+ {
82
+ displayName: "Options",
83
+ name: "options",
84
+ type: "collection",
85
+ default: {},
86
+ options: [
87
+ {
88
+ displayName: "Start Time",
89
+ name: "startTime",
90
+ type: "string",
91
+ default: "",
92
+ description: "The start time of the audio in MM:SS or HH:MM:SS format",
93
+ placeholder: "e.g. 00:15"
94
+ },
95
+ {
96
+ displayName: "End Time",
97
+ name: "endTime",
98
+ type: "string",
99
+ default: "",
100
+ description: "The end time of the audio in MM:SS or HH:MM:SS format",
101
+ placeholder: "e.g. 02:15"
102
+ }
103
+ ]
104
+ }
105
+ ];
106
+ const displayOptions = {
107
+ show: {
108
+ operation: ["transcribe"],
109
+ resource: ["audio"]
110
+ }
111
+ };
112
+ const description = (0, import_n8n_workflow.updateDisplayOptions)(displayOptions, properties);
113
+ async function execute(i) {
114
+ const model = this.getNodeParameter("modelId", i, "", { extractValue: true });
115
+ const inputType = this.getNodeParameter("inputType", i, "url");
116
+ const simplify = this.getNodeParameter("simplify", i, true);
117
+ const options = this.getNodeParameter("options", i, {});
118
+ let contents;
119
+ if (inputType === "url") {
120
+ const urls = this.getNodeParameter("audioUrls", i, "");
121
+ const filesDataPromises = urls.split(",").map((url) => url.trim()).filter((url) => url).map(async (url) => {
122
+ if (url.startsWith("https://generativelanguage.googleapis.com")) {
123
+ const { mimeType } = await import_transport.apiRequest.call(this, "GET", "", {
124
+ option: { url }
125
+ });
126
+ return { fileUri: url, mimeType };
127
+ } else {
128
+ const { fileContent, mimeType } = await import_utils.downloadFile.call(this, url, "audio/mpeg");
129
+ return await import_utils.uploadFile.call(this, fileContent, mimeType);
130
+ }
131
+ });
132
+ const filesData = await Promise.all(filesDataPromises);
133
+ contents = [
134
+ {
135
+ role: "user",
136
+ parts: filesData.map((fileData) => ({
137
+ fileData
138
+ }))
139
+ }
140
+ ];
141
+ } else {
142
+ const binaryPropertyNames = this.getNodeParameter("binaryPropertyName", i, "data");
143
+ const promises = binaryPropertyNames.split(",").map((binaryPropertyName) => binaryPropertyName.trim()).filter((binaryPropertyName) => binaryPropertyName).map(async (binaryPropertyName) => {
144
+ const binaryData = this.helpers.assertBinaryData(i, binaryPropertyName);
145
+ const buffer = await this.helpers.getBinaryDataBuffer(i, binaryPropertyName);
146
+ return await import_utils.uploadFile.call(this, buffer, binaryData.mimeType);
147
+ });
148
+ const filesData = await Promise.all(promises);
149
+ contents = [
150
+ {
151
+ role: "user",
152
+ parts: filesData.map((fileData) => ({
153
+ fileData
154
+ }))
155
+ }
156
+ ];
157
+ }
158
+ const text = `Generate a transcript of the speech${options.startTime ? ` from ${options.startTime}` : ""}${options.endTime ? ` to ${options.endTime}` : ""}`;
159
+ contents[0].parts.push({ text });
160
+ const body = {
161
+ contents
162
+ };
163
+ const response = await import_transport.apiRequest.call(this, "POST", `/v1beta/${model}:generateContent`, {
164
+ body
165
+ });
166
+ if (simplify) {
167
+ return response.candidates.map((candidate) => ({
168
+ json: candidate,
169
+ pairedItem: { item: i }
170
+ }));
171
+ }
172
+ return [
173
+ {
174
+ json: { ...response },
175
+ pairedItem: { item: i }
176
+ }
177
+ ];
178
+ }
179
+ // Annotate the CommonJS export names for ESM import in node:
180
+ 0 && (module.exports = {
181
+ description,
182
+ execute
183
+ });
184
+ //# sourceMappingURL=transcribe.operation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../nodes/vendors/GoogleGemini/actions/audio/transcribe.operation.ts"],"sourcesContent":["import type { IExecuteFunctions, INodeExecutionData, INodeProperties } from 'n8n-workflow';\nimport { updateDisplayOptions } from 'n8n-workflow';\n\nimport type { Content, GenerateContentResponse } from '../../helpers/interfaces';\nimport { downloadFile, uploadFile } from '../../helpers/utils';\nimport { apiRequest } from '../../transport';\nimport { modelRLC } from '../descriptions';\n\nconst properties: INodeProperties[] = [\n\tmodelRLC('audioModelSearch'),\n\t{\n\t\tdisplayName: 'Input Type',\n\t\tname: 'inputType',\n\t\ttype: 'options',\n\t\tdefault: 'url',\n\t\toptions: [\n\t\t\t{\n\t\t\t\tname: 'Audio URL(s)',\n\t\t\t\tvalue: 'url',\n\t\t\t},\n\t\t\t{\n\t\t\t\tname: 'Binary File(s)',\n\t\t\t\tvalue: 'binary',\n\t\t\t},\n\t\t],\n\t},\n\t{\n\t\tdisplayName: 'URL(s)',\n\t\tname: 'audioUrls',\n\t\ttype: 'string',\n\t\tplaceholder: 'e.g. https://example.com/audio.mp3',\n\t\tdescription:\n\t\t\t'URL(s) of the audio(s) to transcribe, multiple URLs can be added separated by comma',\n\t\tdefault: '',\n\t\tdisplayOptions: {\n\t\t\tshow: {\n\t\t\t\tinputType: ['url'],\n\t\t\t},\n\t\t},\n\t},\n\t{\n\t\tdisplayName: 'Input Data Field Name(s)',\n\t\tname: 'binaryPropertyName',\n\t\ttype: 'string',\n\t\tdefault: 'data',\n\t\tplaceholder: 'e.g. data',\n\t\thint: 'The name of the input field containing the binary file data to be processed',\n\t\tdescription:\n\t\t\t'Name of the binary field(s) which contains the audio(s), seperate multiple field names with commas',\n\t\tdisplayOptions: {\n\t\t\tshow: {\n\t\t\t\tinputType: ['binary'],\n\t\t\t},\n\t\t},\n\t},\n\t{\n\t\tdisplayName: 'Simplify Output',\n\t\tname: 'simplify',\n\t\ttype: 'boolean',\n\t\tdefault: true,\n\t\tdescription: 'Whether to simplify the response or not',\n\t},\n\t{\n\t\tdisplayName: 'Options',\n\t\tname: 'options',\n\t\ttype: 'collection',\n\t\tdefault: {},\n\t\toptions: [\n\t\t\t{\n\t\t\t\tdisplayName: 'Start Time',\n\t\t\t\tname: 'startTime',\n\t\t\t\ttype: 'string',\n\t\t\t\tdefault: '',\n\t\t\t\tdescription: 'The start time of the audio in MM:SS or HH:MM:SS format',\n\t\t\t\tplaceholder: 'e.g. 00:15',\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'End Time',\n\t\t\t\tname: 'endTime',\n\t\t\t\ttype: 'string',\n\t\t\t\tdefault: '',\n\t\t\t\tdescription: 'The end time of the audio in MM:SS or HH:MM:SS format',\n\t\t\t\tplaceholder: 'e.g. 02:15',\n\t\t\t},\n\t\t],\n\t},\n];\n\nconst displayOptions = {\n\tshow: {\n\t\toperation: ['transcribe'],\n\t\tresource: ['audio'],\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('modelId', i, '', { extractValue: true }) as string;\n\tconst inputType = this.getNodeParameter('inputType', i, 'url') as string;\n\tconst simplify = this.getNodeParameter('simplify', i, true) as boolean;\n\tconst options = this.getNodeParameter('options', i, {});\n\n\tlet contents: Content[];\n\tif (inputType === 'url') {\n\t\tconst urls = this.getNodeParameter('audioUrls', 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, 'audio/mpeg');\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\tconst text = `Generate a transcript of the speech${\n\t\toptions.startTime ? ` from ${options.startTime as string}` : ''\n\t}${options.endTime ? ` to ${options.endTime as string}` : ''}`;\n\tcontents[0].parts.push({ text });\n\n\tconst body = {\n\t\tcontents,\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":"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","names":[]}
@@ -0,0 +1,52 @@
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 descriptions_exports = {};
20
+ __export(descriptions_exports, {
21
+ modelRLC: () => modelRLC
22
+ });
23
+ module.exports = __toCommonJS(descriptions_exports);
24
+ const modelRLC = (searchListMethod) => ({
25
+ displayName: "Model",
26
+ name: "modelId",
27
+ type: "resourceLocator",
28
+ default: { mode: "list", value: "" },
29
+ required: true,
30
+ modes: [
31
+ {
32
+ displayName: "From List",
33
+ name: "list",
34
+ type: "list",
35
+ typeOptions: {
36
+ searchListMethod,
37
+ searchable: true
38
+ }
39
+ },
40
+ {
41
+ displayName: "ID",
42
+ name: "id",
43
+ type: "string",
44
+ placeholder: "e.g. models/gemini-2.5-flash"
45
+ }
46
+ ]
47
+ });
48
+ // Annotate the CommonJS export names for ESM import in node:
49
+ 0 && (module.exports = {
50
+ modelRLC
51
+ });
52
+ //# sourceMappingURL=descriptions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../nodes/vendors/GoogleGemini/actions/descriptions.ts"],"sourcesContent":["import type { INodeProperties } from 'n8n-workflow';\n\nexport const modelRLC = (searchListMethod: string): INodeProperties => ({\n\tdisplayName: 'Model',\n\tname: 'modelId',\n\ttype: 'resourceLocator',\n\tdefault: { mode: 'list', value: '' },\n\trequired: true,\n\tmodes: [\n\t\t{\n\t\t\tdisplayName: 'From List',\n\t\t\tname: 'list',\n\t\t\ttype: 'list',\n\t\t\ttypeOptions: {\n\t\t\t\tsearchListMethod,\n\t\t\t\tsearchable: true,\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tdisplayName: 'ID',\n\t\t\tname: 'id',\n\t\t\ttype: 'string',\n\t\t\tplaceholder: 'e.g. models/gemini-2.5-flash',\n\t\t},\n\t],\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEO,MAAM,WAAW,CAAC,sBAA+C;AAAA,EACvE,aAAa;AAAA,EACb,MAAM;AAAA,EACN,MAAM;AAAA,EACN,SAAS,EAAE,MAAM,QAAQ,OAAO,GAAG;AAAA,EACnC,UAAU;AAAA,EACV,OAAO;AAAA,IACN;AAAA,MACC,aAAa;AAAA,MACb,MAAM;AAAA,MACN,MAAM;AAAA,MACN,aAAa;AAAA,QACZ;AAAA,QACA,YAAY;AAAA,MACb;AAAA,IACD;AAAA,IACA;AAAA,MACC,aAAa;AAAA,MACb,MAAM;AAAA,MACN,MAAM;AAAA,MACN,aAAa;AAAA,IACd;AAAA,EACD;AACD;","names":[]}
@@ -0,0 +1,125 @@
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 analyze_operation_exports = {};
20
+ __export(analyze_operation_exports, {
21
+ description: () => description,
22
+ execute: () => execute
23
+ });
24
+ module.exports = __toCommonJS(analyze_operation_exports);
25
+ var import_n8n_workflow = require("n8n-workflow");
26
+ var import_baseAnalyze = require("../../helpers/baseAnalyze");
27
+ var import_descriptions = require("../descriptions");
28
+ const properties = [
29
+ (0, import_descriptions.modelRLC)("modelSearch"),
30
+ {
31
+ displayName: "Text Input",
32
+ name: "text",
33
+ type: "string",
34
+ placeholder: "e.g. What's in this document?",
35
+ default: "What's in this document?",
36
+ typeOptions: {
37
+ rows: 2
38
+ }
39
+ },
40
+ {
41
+ displayName: "Input Type",
42
+ name: "inputType",
43
+ type: "options",
44
+ default: "url",
45
+ options: [
46
+ {
47
+ name: "Document URL(s)",
48
+ value: "url"
49
+ },
50
+ {
51
+ name: "Binary File(s)",
52
+ value: "binary"
53
+ }
54
+ ]
55
+ },
56
+ {
57
+ displayName: "URL(s)",
58
+ name: "documentUrls",
59
+ type: "string",
60
+ placeholder: "e.g. https://example.com/document.pdf",
61
+ description: "URL(s) of the document(s) to analyze, multiple URLs can be added separated by comma",
62
+ default: "",
63
+ displayOptions: {
64
+ show: {
65
+ inputType: ["url"]
66
+ }
67
+ }
68
+ },
69
+ {
70
+ displayName: "Input Data Field Name(s)",
71
+ name: "binaryPropertyName",
72
+ type: "string",
73
+ default: "data",
74
+ placeholder: "e.g. data",
75
+ hint: "The name of the input field containing the binary file data to be processed",
76
+ description: "Name of the binary field(s) which contains the document(s), seperate multiple field names with commas",
77
+ displayOptions: {
78
+ show: {
79
+ inputType: ["binary"]
80
+ }
81
+ }
82
+ },
83
+ {
84
+ displayName: "Simplify Output",
85
+ name: "simplify",
86
+ type: "boolean",
87
+ default: true,
88
+ description: "Whether to simplify the response or not"
89
+ },
90
+ {
91
+ displayName: "Options",
92
+ name: "options",
93
+ placeholder: "Add Option",
94
+ type: "collection",
95
+ default: {},
96
+ options: [
97
+ {
98
+ displayName: "Length of Description (Max Tokens)",
99
+ description: "Fewer tokens will result in shorter, less detailed document description",
100
+ name: "maxOutputTokens",
101
+ type: "number",
102
+ default: 300,
103
+ typeOptions: {
104
+ minValue: 1
105
+ }
106
+ }
107
+ ]
108
+ }
109
+ ];
110
+ const displayOptions = {
111
+ show: {
112
+ operation: ["analyze"],
113
+ resource: ["document"]
114
+ }
115
+ };
116
+ const description = (0, import_n8n_workflow.updateDisplayOptions)(displayOptions, properties);
117
+ async function execute(i) {
118
+ return await import_baseAnalyze.baseAnalyze.call(this, i, "documentUrls", "application/pdf");
119
+ }
120
+ // Annotate the CommonJS export names for ESM import in node:
121
+ 0 && (module.exports = {
122
+ description,
123
+ execute
124
+ });
125
+ //# sourceMappingURL=analyze.operation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../nodes/vendors/GoogleGemini/actions/document/analyze.operation.ts"],"sourcesContent":["import type { IExecuteFunctions, INodeExecutionData, INodeProperties } from 'n8n-workflow';\nimport { updateDisplayOptions } from 'n8n-workflow';\n\nimport { baseAnalyze } from '../../helpers/baseAnalyze';\nimport { modelRLC } from '../descriptions';\n\nconst properties: INodeProperties[] = [\n\tmodelRLC('modelSearch'),\n\t{\n\t\tdisplayName: 'Text Input',\n\t\tname: 'text',\n\t\ttype: 'string',\n\t\tplaceholder: \"e.g. What's in this document?\",\n\t\tdefault: \"What's in this document?\",\n\t\ttypeOptions: {\n\t\t\trows: 2,\n\t\t},\n\t},\n\t{\n\t\tdisplayName: 'Input Type',\n\t\tname: 'inputType',\n\t\ttype: 'options',\n\t\tdefault: 'url',\n\t\toptions: [\n\t\t\t{\n\t\t\t\tname: 'Document URL(s)',\n\t\t\t\tvalue: 'url',\n\t\t\t},\n\t\t\t{\n\t\t\t\tname: 'Binary File(s)',\n\t\t\t\tvalue: 'binary',\n\t\t\t},\n\t\t],\n\t},\n\t{\n\t\tdisplayName: 'URL(s)',\n\t\tname: 'documentUrls',\n\t\ttype: 'string',\n\t\tplaceholder: 'e.g. https://example.com/document.pdf',\n\t\tdescription:\n\t\t\t'URL(s) of the document(s) to analyze, multiple URLs can be added separated by comma',\n\t\tdefault: '',\n\t\tdisplayOptions: {\n\t\t\tshow: {\n\t\t\t\tinputType: ['url'],\n\t\t\t},\n\t\t},\n\t},\n\t{\n\t\tdisplayName: 'Input Data Field Name(s)',\n\t\tname: 'binaryPropertyName',\n\t\ttype: 'string',\n\t\tdefault: 'data',\n\t\tplaceholder: 'e.g. data',\n\t\thint: 'The name of the input field containing the binary file data to be processed',\n\t\tdescription:\n\t\t\t'Name of the binary field(s) which contains the document(s), seperate multiple field names with commas',\n\t\tdisplayOptions: {\n\t\t\tshow: {\n\t\t\t\tinputType: ['binary'],\n\t\t\t},\n\t\t},\n\t},\n\t{\n\t\tdisplayName: 'Simplify Output',\n\t\tname: 'simplify',\n\t\ttype: 'boolean',\n\t\tdefault: true,\n\t\tdescription: 'Whether to simplify the response or not',\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: 'Length of Description (Max Tokens)',\n\t\t\t\tdescription: 'Fewer tokens will result in shorter, less detailed document description',\n\t\t\t\tname: 'maxOutputTokens',\n\t\t\t\ttype: 'number',\n\t\t\t\tdefault: 300,\n\t\t\t\ttypeOptions: {\n\t\t\t\t\tminValue: 1,\n\t\t\t\t},\n\t\t\t},\n\t\t],\n\t},\n];\n\nconst displayOptions = {\n\tshow: {\n\t\toperation: ['analyze'],\n\t\tresource: ['document'],\n\t},\n};\n\nexport const description = updateDisplayOptions(displayOptions, properties);\n\nexport async function execute(this: IExecuteFunctions, i: number): Promise<INodeExecutionData[]> {\n\treturn await baseAnalyze.call(this, i, 'documentUrls', 'application/pdf');\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,0BAAqC;AAErC,yBAA4B;AAC5B,0BAAyB;AAEzB,MAAM,aAAgC;AAAA,MACrC,8BAAS,aAAa;AAAA,EACtB;AAAA,IACC,aAAa;AAAA,IACb,MAAM;AAAA,IACN,MAAM;AAAA,IACN,aAAa;AAAA,IACb,SAAS;AAAA,IACT,aAAa;AAAA,MACZ,MAAM;AAAA,IACP;AAAA,EACD;AAAA,EACA;AAAA,IACC,aAAa;AAAA,IACb,MAAM;AAAA,IACN,MAAM;AAAA,IACN,SAAS;AAAA,IACT,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,gBAAgB;AAAA,MACf,MAAM;AAAA,QACL,WAAW,CAAC,KAAK;AAAA,MAClB;AAAA,IACD;AAAA,EACD;AAAA,EACA;AAAA,IACC,aAAa;AAAA,IACb,MAAM;AAAA,IACN,MAAM;AAAA,IACN,SAAS;AAAA,IACT,aAAa;AAAA,IACb,MAAM;AAAA,IACN,aACC;AAAA,IACD,gBAAgB;AAAA,MACf,MAAM;AAAA,QACL,WAAW,CAAC,QAAQ;AAAA,MACrB;AAAA,IACD;AAAA,EACD;AAAA,EACA;AAAA,IACC,aAAa;AAAA,IACb,MAAM;AAAA,IACN,MAAM;AAAA,IACN,SAAS;AAAA,IACT,aAAa;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,aAAa;AAAA,QACb,MAAM;AAAA,QACN,MAAM;AAAA,QACN,SAAS;AAAA,QACT,aAAa;AAAA,UACZ,UAAU;AAAA,QACX;AAAA,MACD;AAAA,IACD;AAAA,EACD;AACD;AAEA,MAAM,iBAAiB;AAAA,EACtB,MAAM;AAAA,IACL,WAAW,CAAC,SAAS;AAAA,IACrB,UAAU,CAAC,UAAU;AAAA,EACtB;AACD;AAEO,MAAM,kBAAc,0CAAqB,gBAAgB,UAAU;AAE1E,eAAsB,QAAiC,GAA0C;AAChG,SAAO,MAAM,+BAAY,KAAK,MAAM,GAAG,gBAAgB,iBAAiB;AACzE;","names":[]}