n8n-nodes-vlm 3.3.7 → 3.3.8
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.
|
@@ -144,7 +144,7 @@ async function classifySingleDocument(context, config) {
|
|
|
144
144
|
* Classify documents using VLM Classifier
|
|
145
145
|
*/
|
|
146
146
|
async function classifyDocuments(context, config) {
|
|
147
|
-
const { serverUrl, model, documents, timeout, classificationStrategy = 'metadata', filterComplexity = 'both' } = config;
|
|
147
|
+
const { serverUrl, model, documents, timeout, classificationStrategy = 'metadata', filterComplexity = 'both', } = config;
|
|
148
148
|
// Step 1: Classify all documents
|
|
149
149
|
const classificationPromises = documents.map(async (doc, index) => {
|
|
150
150
|
const classification = await classifyDocumentComplexity(context, serverUrl, doc, timeout, model);
|
|
@@ -155,7 +155,7 @@ async function classifyDocuments(context, config) {
|
|
|
155
155
|
let docsToReturn = classifiedDocs;
|
|
156
156
|
if (classificationStrategy === 'filter' || classificationStrategy === 'both') {
|
|
157
157
|
if (filterComplexity !== 'both') {
|
|
158
|
-
docsToReturn = classifiedDocs.filter(item => item.classification.complexity === filterComplexity);
|
|
158
|
+
docsToReturn = classifiedDocs.filter((item) => item.classification.complexity === filterComplexity);
|
|
159
159
|
}
|
|
160
160
|
}
|
|
161
161
|
// If no documents pass the filter, return empty
|
|
@@ -163,7 +163,7 @@ async function classifyDocuments(context, config) {
|
|
|
163
163
|
return [];
|
|
164
164
|
}
|
|
165
165
|
// Step 3: Add metadata if requested
|
|
166
|
-
const finalDocs = docsToReturn.map(item => {
|
|
166
|
+
const finalDocs = docsToReturn.map((item) => {
|
|
167
167
|
const enrichedDoc = { ...item.doc };
|
|
168
168
|
if (classificationStrategy === 'metadata' || classificationStrategy === 'both') {
|
|
169
169
|
enrichedDoc._complexityClass = item.classification.complexity;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "n8n-nodes-vlm",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.8",
|
|
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",
|
|
@@ -92,6 +92,7 @@
|
|
|
92
92
|
"handlebars": "^4.7.9",
|
|
93
93
|
"flatted": "^3.4.2",
|
|
94
94
|
"picomatch": "^2.3.2",
|
|
95
|
+
"fast-uri": "^3.1.2",
|
|
95
96
|
"yaml": "^2.8.3",
|
|
96
97
|
"brace-expansion": "^1.1.13"
|
|
97
98
|
}
|