@n8n/n8n-nodes-langchain 1.110.0 → 1.111.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -30,10 +30,12 @@ var image_exports = {};
30
30
  __export(image_exports, {
31
31
  analyze: () => analyze,
32
32
  description: () => description,
33
+ edit: () => edit,
33
34
  generate: () => generate
34
35
  });
35
36
  module.exports = __toCommonJS(image_exports);
36
37
  var analyze = __toESM(require("./analyze.operation"));
38
+ var edit = __toESM(require("./edit.operation"));
37
39
  var generate = __toESM(require("./generate.operation"));
38
40
  const description = [
39
41
  {
@@ -45,7 +47,7 @@ const description = [
45
47
  {
46
48
  name: "Analyze Image",
47
49
  value: "analyze",
48
- action: "Analyze image",
50
+ action: "Analyze an image",
49
51
  description: "Take in images and answer questions about them"
50
52
  },
51
53
  {
@@ -53,6 +55,12 @@ const description = [
53
55
  value: "generate",
54
56
  action: "Generate an image",
55
57
  description: "Creates an image from a text prompt"
58
+ },
59
+ {
60
+ name: "Edit Image",
61
+ value: "edit",
62
+ action: "Edit an image",
63
+ description: "Upload one or more images and apply edits based on a prompt"
56
64
  }
57
65
  ],
58
66
  default: "generate",
@@ -63,12 +71,14 @@ const description = [
63
71
  }
64
72
  },
65
73
  ...analyze.description,
74
+ ...edit.description,
66
75
  ...generate.description
67
76
  ];
68
77
  // Annotate the CommonJS export names for ESM import in node:
69
78
  0 && (module.exports = {
70
79
  analyze,
71
80
  description,
81
+ edit,
72
82
  generate
73
83
  });
74
84
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../nodes/vendors/GoogleGemini/actions/image/index.ts"],"sourcesContent":["import type { INodeProperties } from 'n8n-workflow';\n\nimport * as analyze from './analyze.operation';\nimport * as generate from './generate.operation';\n\nexport { analyze, 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 Image',\n\t\t\t\tvalue: 'analyze',\n\t\t\t\taction: 'Analyze image',\n\t\t\t\tdescription: 'Take in images and answer questions about them',\n\t\t\t},\n\t\t\t{\n\t\t\t\tname: 'Generate an Image',\n\t\t\t\tvalue: 'generate',\n\t\t\t\taction: 'Generate an image',\n\t\t\t\tdescription: 'Creates an image from a text prompt',\n\t\t\t},\n\t\t],\n\t\tdefault: 'generate',\n\t\tdisplayOptions: {\n\t\t\tshow: {\n\t\t\t\tresource: ['image'],\n\t\t\t},\n\t\t},\n\t},\n\t...analyze.description,\n\t...generate.description,\n];\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,cAAyB;AACzB,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,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;AACb;","names":[]}
1
+ {"version":3,"sources":["../../../../../../nodes/vendors/GoogleGemini/actions/image/index.ts"],"sourcesContent":["import type { INodeProperties } from 'n8n-workflow';\n\nimport * as analyze from './analyze.operation';\nimport * as edit from './edit.operation';\nimport * as generate from './generate.operation';\n\nexport { analyze, generate, edit };\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 Image',\n\t\t\t\tvalue: 'analyze',\n\t\t\t\taction: 'Analyze an image',\n\t\t\t\tdescription: 'Take in images and answer questions about them',\n\t\t\t},\n\t\t\t{\n\t\t\t\tname: 'Generate an Image',\n\t\t\t\tvalue: 'generate',\n\t\t\t\taction: 'Generate an image',\n\t\t\t\tdescription: 'Creates an image from a text prompt',\n\t\t\t},\n\t\t\t{\n\t\t\t\tname: 'Edit Image',\n\t\t\t\tvalue: 'edit',\n\t\t\t\taction: 'Edit an image',\n\t\t\t\tdescription: 'Upload one or more images and apply edits based on a prompt',\n\t\t\t},\n\t\t],\n\t\tdefault: 'generate',\n\t\tdisplayOptions: {\n\t\t\tshow: {\n\t\t\t\tresource: ['image'],\n\t\t\t},\n\t\t},\n\t},\n\t...analyze.description,\n\t...edit.description,\n\t...generate.description,\n];\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,cAAyB;AACzB,WAAsB;AACtB,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,KAAK;AAAA,EACR,GAAG,SAAS;AACb;","names":[]}
@@ -22,12 +22,19 @@ __export(transport_exports, {
22
22
  });
23
23
  module.exports = __toCommonJS(transport_exports);
24
24
  async function apiRequest(method, endpoint, parameters) {
25
- const { body, qs, option, headers } = parameters ?? {};
25
+ const { body, qs, option } = parameters ?? {};
26
26
  const credentials = await this.getCredentials("openAiApi");
27
27
  let uri = `https://api.openai.com/v1${endpoint}`;
28
+ let headers = parameters?.headers ?? {};
28
29
  if (credentials.url) {
29
30
  uri = `${credentials?.url}${endpoint}`;
30
31
  }
32
+ if (credentials.header && typeof credentials.headerName === "string" && credentials.headerName && typeof credentials.headerValue === "string") {
33
+ headers = {
34
+ ...headers,
35
+ [credentials.headerName]: credentials.headerValue
36
+ };
37
+ }
31
38
  const options = {
32
39
  headers,
33
40
  method,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../nodes/vendors/OpenAi/transport/index.ts"],"sourcesContent":["import type {\n\tIDataObject,\n\tIExecuteFunctions,\n\tIHttpRequestMethods,\n\tILoadOptionsFunctions,\n} from 'n8n-workflow';\ntype RequestParameters = {\n\theaders?: IDataObject;\n\tbody?: IDataObject | string;\n\tqs?: IDataObject;\n\turi?: string;\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('openAiApi');\n\n\tlet uri = `https://api.openai.com/v1${endpoint}`;\n\n\tif (credentials.url) {\n\t\turi = `${credentials?.url}${endpoint}`;\n\t}\n\n\tconst options = {\n\t\theaders,\n\t\tmethod,\n\t\tbody,\n\t\tqs,\n\t\turi,\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.requestWithAuthentication.call(this, 'openAiApi', 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,WAAW;AAEzD,MAAI,MAAM,4BAA4B,QAAQ;AAE9C,MAAI,YAAY,KAAK;AACpB,UAAM,GAAG,aAAa,GAAG,GAAG,QAAQ;AAAA,EACrC;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,0BAA0B,KAAK,MAAM,aAAa,OAAO;AACpF;","names":[]}
1
+ {"version":3,"sources":["../../../../../nodes/vendors/OpenAi/transport/index.ts"],"sourcesContent":["import type {\n\tIDataObject,\n\tIExecuteFunctions,\n\tIHttpRequestMethods,\n\tILoadOptionsFunctions,\n} from 'n8n-workflow';\ntype RequestParameters = {\n\theaders?: IDataObject;\n\tbody?: IDataObject | string;\n\tqs?: IDataObject;\n\turi?: string;\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 } = parameters ?? {};\n\n\tconst credentials = await this.getCredentials('openAiApi');\n\n\tlet uri = `https://api.openai.com/v1${endpoint}`;\n\tlet headers = parameters?.headers ?? {};\n\tif (credentials.url) {\n\t\turi = `${credentials?.url}${endpoint}`;\n\t}\n\n\tif (\n\t\tcredentials.header &&\n\t\ttypeof credentials.headerName === 'string' &&\n\t\tcredentials.headerName &&\n\t\ttypeof credentials.headerValue === 'string'\n\t) {\n\t\theaders = {\n\t\t\t...headers,\n\t\t\t[credentials.headerName]: credentials.headerValue,\n\t\t};\n\t}\n\n\tconst options = {\n\t\theaders,\n\t\tmethod,\n\t\tbody,\n\t\tqs,\n\t\turi,\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.requestWithAuthentication.call(this, 'openAiApi', options);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAcA,eAAsB,WAErB,QACA,UACA,YACC;AACD,QAAM,EAAE,MAAM,IAAI,OAAO,IAAI,cAAc,CAAC;AAE5C,QAAM,cAAc,MAAM,KAAK,eAAe,WAAW;AAEzD,MAAI,MAAM,4BAA4B,QAAQ;AAC9C,MAAI,UAAU,YAAY,WAAW,CAAC;AACtC,MAAI,YAAY,KAAK;AACpB,UAAM,GAAG,aAAa,GAAG,GAAG,QAAQ;AAAA,EACrC;AAEA,MACC,YAAY,UACZ,OAAO,YAAY,eAAe,YAClC,YAAY,cACZ,OAAO,YAAY,gBAAgB,UAClC;AACD,cAAU;AAAA,MACT,GAAG;AAAA,MACH,CAAC,YAAY,UAAU,GAAG,YAAY;AAAA,IACvC;AAAA,EACD;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,0BAA0B,KAAK,MAAM,aAAa,OAAO;AACpF;","names":[]}