n8n-nodes-vlm 3.3.0 → 3.3.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.
@@ -181,12 +181,7 @@ class VLMComplexityWorkflow {
181
181
  },
182
182
  ],
183
183
  default: 'raw',
184
- description: 'Format of the base64 in the output field',
185
- displayOptions: {
186
- hide: {
187
- outputBase64Field: [''],
188
- },
189
- },
184
+ description: 'Format of the base64 in the output field. Only used when Output Base64 Field is set.',
190
185
  },
191
186
  // ═══════════════════════════════════════════════════════════════
192
187
  // ADVANCED OPTIONS
@@ -327,21 +322,27 @@ class VLMComplexityWorkflow {
327
322
  this.logger.debug(`VLM DEBUG OUTPUT [${i}]: format='${outputBase64Format}', choosing ${outputBase64Format === 'raw' ? 'rawBase64' : 'base64Image'}`);
328
323
  const outputBase64Value = outputBase64Format === 'raw' ? rawBase64 : base64Image;
329
324
  this.logger.debug(`VLM DEBUG OUTPUT [${i}]: outputBase64Value prefix='${outputBase64Value === null || outputBase64Value === void 0 ? void 0 : outputBase64Value.substring(0, 40)}...'`);
325
+ this.logger.debug(`VLM DEBUG OUTPUT [${i}]: Will add to JSON? outputBase64Field='${outputBase64Field}' (truthy=${!!outputBase64Field}), hasValue=${!!outputBase64Value}`);
326
+ // Build base JSON output
327
+ const outputJson = {
328
+ // Classification results (top level for visibility)
329
+ complexityClass: classification.complexity,
330
+ complexityConfidence: classification.confidence,
331
+ processingTime: classification.processingTime,
332
+ modelUsed: classification.modelUsed,
333
+ // Original JSON data merged in
334
+ ...item.json,
335
+ // Item tracking
336
+ _itemIndex: i,
337
+ };
338
+ // Add base64 to output if field name is specified
339
+ if (outputBase64Field && outputBase64Field.trim() !== '' && outputBase64Value) {
340
+ outputJson[outputBase64Field] = outputBase64Value;
341
+ this.logger.debug(`VLM DEBUG OUTPUT [${i}]: Added '${outputBase64Field}' = '${outputBase64Value.substring(0, 30)}...'`);
342
+ }
330
343
  // Build output item with BOTH json AND binary
331
344
  const outputItem = {
332
- json: {
333
- // Classification results (top level for visibility)
334
- complexityClass: classification.complexity,
335
- complexityConfidence: classification.confidence,
336
- processingTime: classification.processingTime,
337
- modelUsed: classification.modelUsed,
338
- // Original JSON data merged in
339
- ...item.json,
340
- // Item tracking
341
- _itemIndex: i,
342
- // Optional: include base64 in output JSON (format depends on outputBase64Format)
343
- ...(outputBase64Field && outputBase64Value ? { [outputBase64Field]: outputBase64Value } : {}),
344
- },
345
+ json: outputJson,
345
346
  // ALWAYS preserve binary data
346
347
  binary: item.binary,
347
348
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "n8n-nodes-vlm",
3
- "version": "3.3.0",
3
+ "version": "3.3.1",
4
4
  "description": "Vision-Language Models for n8n - Lightweight specialized VLMs for document analysis and classification",
5
5
  "main": "dist/index.js",
6
6
  "author": "Nicolas Geysse",