n8n-nodes-paaalleeee 1.1.2 → 1.1.3
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.
|
@@ -2,13 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.PalatineSpeechNode = void 0;
|
|
4
4
|
const n8n_workflow_1 = require("n8n-workflow");
|
|
5
|
-
// Polling defaults (by task)
|
|
6
|
-
const TASK_POLL_DEFAULTS = {
|
|
7
|
-
transcribe: { pollIntervalMs: 500, maxPollAttempts: 200 },
|
|
8
|
-
diarize: { pollIntervalMs: 500, maxPollAttempts: 200 },
|
|
9
|
-
sentiment: { pollIntervalMs: 500, maxPollAttempts: 200 },
|
|
10
|
-
summarize: { pollIntervalMs: 20000, maxPollAttempts: 500 },
|
|
11
|
-
};
|
|
12
5
|
class PalatineSpeechNode {
|
|
13
6
|
description = {
|
|
14
7
|
displayName: 'Palatine Speech',
|
|
@@ -83,23 +76,65 @@ class PalatineSpeechNode {
|
|
|
83
76
|
displayName: 'Polling Interval',
|
|
84
77
|
name: 'pollIntervalMs',
|
|
85
78
|
type: 'number',
|
|
79
|
+
displayOptions: {
|
|
80
|
+
show: {
|
|
81
|
+
task: ['transcribe', 'diarize', 'sentiment'],
|
|
82
|
+
},
|
|
83
|
+
},
|
|
86
84
|
typeOptions: {
|
|
87
85
|
minValue: 500,
|
|
88
86
|
maxValue: 900000,
|
|
89
87
|
},
|
|
90
88
|
default: 500,
|
|
91
|
-
description: 'How often node polls API to retrieve result. Minimum 500 ms, maximum 900000 ms
|
|
89
|
+
description: 'How often node polls API to retrieve result. Minimum 500 ms, maximum 900000 ms',
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
displayName: 'Polling Interval',
|
|
93
|
+
name: 'pollIntervalMsSummarize',
|
|
94
|
+
type: 'number',
|
|
95
|
+
displayOptions: {
|
|
96
|
+
show: {
|
|
97
|
+
task: ['summarize'],
|
|
98
|
+
},
|
|
99
|
+
},
|
|
100
|
+
typeOptions: {
|
|
101
|
+
minValue: 500,
|
|
102
|
+
maxValue: 900000,
|
|
103
|
+
},
|
|
104
|
+
default: 20000,
|
|
105
|
+
description: 'How often node polls API to retrieve result. Minimum 500 ms, maximum 900000 ms',
|
|
92
106
|
},
|
|
93
107
|
{
|
|
94
108
|
displayName: 'Max Poll Attempts',
|
|
95
109
|
name: 'maxPollAttempts',
|
|
96
110
|
type: 'number',
|
|
111
|
+
displayOptions: {
|
|
112
|
+
show: {
|
|
113
|
+
task: ['transcribe', 'diarize', 'sentiment'],
|
|
114
|
+
},
|
|
115
|
+
},
|
|
97
116
|
typeOptions: {
|
|
98
117
|
minValue: 1,
|
|
99
118
|
maxValue: 1000,
|
|
100
119
|
},
|
|
101
120
|
default: 200,
|
|
102
|
-
description: 'How many times node polls API before giving up. Minimum 1 attempt, maximum 1000 attempts
|
|
121
|
+
description: 'How many times node polls API before giving up. Minimum 1 attempt, maximum 1000 attempts',
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
displayName: 'Max Poll Attempts',
|
|
125
|
+
name: 'maxPollAttemptsSummarize',
|
|
126
|
+
type: 'number',
|
|
127
|
+
displayOptions: {
|
|
128
|
+
show: {
|
|
129
|
+
task: ['summarize'],
|
|
130
|
+
},
|
|
131
|
+
},
|
|
132
|
+
typeOptions: {
|
|
133
|
+
minValue: 1,
|
|
134
|
+
maxValue: 1000,
|
|
135
|
+
},
|
|
136
|
+
default: 500,
|
|
137
|
+
description: 'How many times node polls API before giving up. Minimum 1 attempt, maximum 1000 attempts',
|
|
103
138
|
},
|
|
104
139
|
// Summarize-only
|
|
105
140
|
{
|
|
@@ -215,24 +250,32 @@ class PalatineSpeechNode {
|
|
|
215
250
|
summarizePromptRaw = this.getNodeParameter('summarizePrompt', i, '') || '';
|
|
216
251
|
}
|
|
217
252
|
}
|
|
218
|
-
// Polling params from UI
|
|
219
|
-
|
|
220
|
-
let
|
|
221
|
-
|
|
222
|
-
const taskDefaults = TASK_POLL_DEFAULTS[task];
|
|
253
|
+
// Polling params from UI (task-specific defaults)
|
|
254
|
+
const nodeParams = (this.getNode().parameters ?? {});
|
|
255
|
+
let pollIntervalMs;
|
|
256
|
+
let maxPollAttempts;
|
|
223
257
|
if (task === 'summarize') {
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
if (
|
|
228
|
-
|
|
258
|
+
pollIntervalMs = this.getNodeParameter('pollIntervalMsSummarize', i);
|
|
259
|
+
maxPollAttempts = this.getNodeParameter('maxPollAttemptsSummarize', i);
|
|
260
|
+
// Backward compatibility: preserve legacy custom values if clearly custom
|
|
261
|
+
if (!('pollIntervalMsSummarize' in nodeParams) && 'pollIntervalMs' in nodeParams) {
|
|
262
|
+
const legacyRaw = nodeParams['pollIntervalMs'];
|
|
263
|
+
const legacy = typeof legacyRaw === 'number' ? legacyRaw : Number(legacyRaw);
|
|
264
|
+
if (!Number.isNaN(legacy) && legacy !== 500 && legacy !== 1000) {
|
|
265
|
+
pollIntervalMs = legacy;
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
if (!('maxPollAttemptsSummarize' in nodeParams) && 'maxPollAttempts' in nodeParams) {
|
|
269
|
+
const legacyRaw = nodeParams['maxPollAttempts'];
|
|
270
|
+
const legacy = typeof legacyRaw === 'number' ? legacyRaw : Number(legacyRaw);
|
|
271
|
+
if (!Number.isNaN(legacy) && legacy !== 200 && legacy !== 300) {
|
|
272
|
+
maxPollAttempts = legacy;
|
|
273
|
+
}
|
|
274
|
+
}
|
|
229
275
|
}
|
|
230
276
|
else {
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
pollIntervalMs = taskDefaults.pollIntervalMs; // 500
|
|
234
|
-
if (maxPollAttempts === 300)
|
|
235
|
-
maxPollAttempts = taskDefaults.maxPollAttempts; // 200
|
|
277
|
+
pollIntervalMs = this.getNodeParameter('pollIntervalMs', i);
|
|
278
|
+
maxPollAttempts = this.getNodeParameter('maxPollAttempts', i);
|
|
236
279
|
}
|
|
237
280
|
// clamp
|
|
238
281
|
pollIntervalMs = Math.min(900000, Math.max(500, pollIntervalMs));
|
package/package.json
CHANGED