@inductiv/node-red-openai-api 0.3.8 → 0.4.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.
- package/README.md +14 -0
- package/examples/assistants.json +60 -82
- package/examples/audio.json +182 -63
- package/examples/files.json +70 -32
- package/examples/images.json +56 -28
- package/lib.js +666 -688
- package/locales/de-DE/node.json +2 -1
- package/locales/en-US/node.json +1 -1
- package/locales/ja/node.json +2 -1
- package/locales/zh-CN/node.json +2 -1
- package/node.html +2562 -572
- package/node.js +61 -98
- package/package.json +2 -3
package/README.md
CHANGED
|
@@ -9,6 +9,20 @@
|
|
|
9
9
|
|
|
10
10
|
_@inductiv/node-red-openai-api_ offers a versatile and configurable Node-RED node, designed specifically for seamless integration with OpenAI's advanced platform services. It empowers you to effortlessly connect and orchestrate various OpenAI functionalities, leveraging the full power of Node-RED's sophisticated application nodes. Whether you're aiming to enhance your workflows with cutting-edge AI capabilities or create innovative applications, this node serves as your gateway to harnessing the latest in AI technology from OpenAI, all within the intuitive and flexible environment of Node-RED.
|
|
11
11
|
|
|
12
|
+
## New in Version 0.4.0
|
|
13
|
+
|
|
14
|
+
- Simplified file uploads.
|
|
15
|
+
- The `create file` function is now named `upload file` -- update your nodes accordingly.
|
|
16
|
+
- You no longer need to manually retrieve files in your flow using extra nodes (function, read file, etc.). The `upload file` function now accepts your desired file's absolute path as the `msg.payload.file` value.
|
|
17
|
+
- See the following updated examples (located in the `examples` directory) for more:
|
|
18
|
+
- Files
|
|
19
|
+
- Audio
|
|
20
|
+
- Images
|
|
21
|
+
- Assistants
|
|
22
|
+
- Reliability improvements.
|
|
23
|
+
- Now has full OpenAI Node.js package spec parity.
|
|
24
|
+
- Bug fixes.
|
|
25
|
+
|
|
12
26
|
## Key Features
|
|
13
27
|
|
|
14
28
|
- **Seamless Integration**: Directly connect with OpenAI services without the hassle of complex coding or setup.
|
package/examples/assistants.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
{
|
|
3
3
|
"id": "78b174792ca9efaf",
|
|
4
4
|
"type": "tab",
|
|
5
|
-
"label": "Assistants
|
|
5
|
+
"label": "Assistants Examples",
|
|
6
6
|
"disabled": false,
|
|
7
7
|
"info": "",
|
|
8
8
|
"env": []
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
],
|
|
34
34
|
"x": 94,
|
|
35
35
|
"y": 113,
|
|
36
|
-
"w":
|
|
36
|
+
"w": 1472,
|
|
37
37
|
"h": 374
|
|
38
38
|
},
|
|
39
39
|
{
|
|
@@ -51,16 +51,15 @@
|
|
|
51
51
|
"color": "#a4a4a4"
|
|
52
52
|
},
|
|
53
53
|
"nodes": [
|
|
54
|
-
"e6cb8abd4fe85ef3",
|
|
55
54
|
"7a825447030eb842",
|
|
56
55
|
"e78656f2a1db4141",
|
|
57
|
-
"50dc0daeab93f1d7",
|
|
58
56
|
"a342bcf840361d49",
|
|
59
|
-
"da5c242d75d45b1a"
|
|
57
|
+
"da5c242d75d45b1a",
|
|
58
|
+
"faf6244b17ba1131"
|
|
60
59
|
],
|
|
61
60
|
"x": 454,
|
|
62
61
|
"y": 139,
|
|
63
|
-
"w":
|
|
62
|
+
"w": 832,
|
|
64
63
|
"h": 122
|
|
65
64
|
},
|
|
66
65
|
{
|
|
@@ -78,8 +77,8 @@
|
|
|
78
77
|
"color": "#a4a4a4"
|
|
79
78
|
},
|
|
80
79
|
"nodes": [
|
|
81
|
-
"
|
|
82
|
-
"
|
|
80
|
+
"d0ed57739e76eba4",
|
|
81
|
+
"a319c0690ad183bc"
|
|
83
82
|
],
|
|
84
83
|
"x": 454,
|
|
85
84
|
"y": 339,
|
|
@@ -96,8 +95,8 @@
|
|
|
96
95
|
"tosidebar": true,
|
|
97
96
|
"console": false,
|
|
98
97
|
"tostatus": false,
|
|
99
|
-
"complete": "
|
|
100
|
-
"targetType": "
|
|
98
|
+
"complete": "payload",
|
|
99
|
+
"targetType": "msg",
|
|
101
100
|
"statusVal": "",
|
|
102
101
|
"statusType": "auto",
|
|
103
102
|
"x": 760,
|
|
@@ -120,12 +119,12 @@
|
|
|
120
119
|
},
|
|
121
120
|
{
|
|
122
121
|
"p": "assistant.name",
|
|
123
|
-
"v": "
|
|
122
|
+
"v": "_node-red-openai-api-rag-example_",
|
|
124
123
|
"vt": "str"
|
|
125
124
|
},
|
|
126
125
|
{
|
|
127
126
|
"p": "assistant.model",
|
|
128
|
-
"v": "gpt-
|
|
127
|
+
"v": "gpt-3.5-turbo-1106",
|
|
129
128
|
"vt": "str"
|
|
130
129
|
},
|
|
131
130
|
{
|
|
@@ -149,7 +148,7 @@
|
|
|
149
148
|
"once": false,
|
|
150
149
|
"onceDelay": 0.1,
|
|
151
150
|
"topic": "retrieval",
|
|
152
|
-
"payload": "[\"/path/to/
|
|
151
|
+
"payload": "[\"/path/to/my/file-1.txt\",\"/path/to/my/file-2.txt\"]",
|
|
153
152
|
"payloadType": "json",
|
|
154
153
|
"x": 220,
|
|
155
154
|
"y": 220,
|
|
@@ -187,7 +186,7 @@
|
|
|
187
186
|
"7a825447030eb842"
|
|
188
187
|
],
|
|
189
188
|
[
|
|
190
|
-
"
|
|
189
|
+
"a319c0690ad183bc"
|
|
191
190
|
]
|
|
192
191
|
],
|
|
193
192
|
"outputLabels": [
|
|
@@ -200,9 +199,9 @@
|
|
|
200
199
|
"type": "comment",
|
|
201
200
|
"z": "78b174792ca9efaf",
|
|
202
201
|
"g": "3aed22e8a8626b49",
|
|
203
|
-
"name": "Document-Enhanced Assistant",
|
|
202
|
+
"name": "Document-Enhanced (RAG) Assistant",
|
|
204
203
|
"info": "",
|
|
205
|
-
"x":
|
|
204
|
+
"x": 270,
|
|
206
205
|
"y": 180,
|
|
207
206
|
"wires": []
|
|
208
207
|
},
|
|
@@ -215,7 +214,7 @@
|
|
|
215
214
|
"props": [
|
|
216
215
|
{
|
|
217
216
|
"p": "payload.name",
|
|
218
|
-
"v": "
|
|
217
|
+
"v": "_node-red-openai-api-example_",
|
|
219
218
|
"vt": "str"
|
|
220
219
|
},
|
|
221
220
|
{
|
|
@@ -257,19 +256,19 @@
|
|
|
257
256
|
"type": "function",
|
|
258
257
|
"z": "78b174792ca9efaf",
|
|
259
258
|
"g": "3aed22e8a8626b49",
|
|
260
|
-
"name": "structure assistant",
|
|
261
|
-
"func": "// create an array of IDs from the fil upload response.\nconst file_ids = msg.payload.map(element => element.id);\n\n// attach the file IDs to the assistant.\nmsg.assistant.file_ids = file_ids;\n\nmsg.payload = msg.assistant;\n\
|
|
259
|
+
"name": "structure assistant payload",
|
|
260
|
+
"func": "// create an array of IDs from the fil upload response.\nconst file_ids = msg.payload.map(element => element.id);\n\n// attach the file IDs to the assistant.\nmsg.assistant.file_ids = file_ids;\n\nmsg.payload = msg.assistant;\n\nreturn msg;",
|
|
262
261
|
"outputs": 1,
|
|
263
262
|
"timeout": 0,
|
|
264
263
|
"noerr": 0,
|
|
265
264
|
"initialize": "",
|
|
266
265
|
"finalize": "",
|
|
267
266
|
"libs": [],
|
|
268
|
-
"x":
|
|
267
|
+
"x": 1420,
|
|
269
268
|
"y": 220,
|
|
270
269
|
"wires": [
|
|
271
270
|
[
|
|
272
|
-
"
|
|
271
|
+
"a319c0690ad183bc"
|
|
273
272
|
]
|
|
274
273
|
]
|
|
275
274
|
},
|
|
@@ -284,44 +283,23 @@
|
|
|
284
283
|
"y": 420,
|
|
285
284
|
"wires": []
|
|
286
285
|
},
|
|
287
|
-
{
|
|
288
|
-
"id": "e6cb8abd4fe85ef3",
|
|
289
|
-
"type": "file in",
|
|
290
|
-
"z": "78b174792ca9efaf",
|
|
291
|
-
"g": "6ada9879e91ef156",
|
|
292
|
-
"name": "read file",
|
|
293
|
-
"filename": "payload",
|
|
294
|
-
"filenameType": "msg",
|
|
295
|
-
"format": "",
|
|
296
|
-
"chunk": false,
|
|
297
|
-
"sendError": false,
|
|
298
|
-
"encoding": "none",
|
|
299
|
-
"allProps": false,
|
|
300
|
-
"x": 740,
|
|
301
|
-
"y": 220,
|
|
302
|
-
"wires": [
|
|
303
|
-
[
|
|
304
|
-
"da5c242d75d45b1a"
|
|
305
|
-
]
|
|
306
|
-
]
|
|
307
|
-
},
|
|
308
286
|
{
|
|
309
287
|
"id": "7a825447030eb842",
|
|
310
288
|
"type": "split",
|
|
311
289
|
"z": "78b174792ca9efaf",
|
|
312
290
|
"g": "6ada9879e91ef156",
|
|
313
|
-
"name": "
|
|
291
|
+
"name": "gather file details",
|
|
314
292
|
"splt": "\\n",
|
|
315
293
|
"spltType": "str",
|
|
316
294
|
"arraySplt": 1,
|
|
317
295
|
"arraySpltType": "len",
|
|
318
296
|
"stream": false,
|
|
319
297
|
"addname": "",
|
|
320
|
-
"x":
|
|
298
|
+
"x": 570,
|
|
321
299
|
"y": 220,
|
|
322
300
|
"wires": [
|
|
323
301
|
[
|
|
324
|
-
"
|
|
302
|
+
"da5c242d75d45b1a"
|
|
325
303
|
]
|
|
326
304
|
]
|
|
327
305
|
},
|
|
@@ -330,7 +308,7 @@
|
|
|
330
308
|
"type": "join",
|
|
331
309
|
"z": "78b174792ca9efaf",
|
|
332
310
|
"g": "6ada9879e91ef156",
|
|
333
|
-
"name": "gather
|
|
311
|
+
"name": "gather files",
|
|
334
312
|
"mode": "auto",
|
|
335
313
|
"build": "object",
|
|
336
314
|
"property": "payload",
|
|
@@ -346,7 +324,7 @@
|
|
|
346
324
|
"reduceInit": "",
|
|
347
325
|
"reduceInitType": "",
|
|
348
326
|
"reduceFixup": "",
|
|
349
|
-
"x":
|
|
327
|
+
"x": 1190,
|
|
350
328
|
"y": 220,
|
|
351
329
|
"wires": [
|
|
352
330
|
[
|
|
@@ -354,22 +332,6 @@
|
|
|
354
332
|
]
|
|
355
333
|
]
|
|
356
334
|
},
|
|
357
|
-
{
|
|
358
|
-
"id": "50dc0daeab93f1d7",
|
|
359
|
-
"type": "OpenAI API",
|
|
360
|
-
"z": "78b174792ca9efaf",
|
|
361
|
-
"g": "6ada9879e91ef156",
|
|
362
|
-
"name": "upload files",
|
|
363
|
-
"service": "808a04cb8707d787",
|
|
364
|
-
"method": "createFile",
|
|
365
|
-
"x": 1090,
|
|
366
|
-
"y": 220,
|
|
367
|
-
"wires": [
|
|
368
|
-
[
|
|
369
|
-
"e78656f2a1db4141"
|
|
370
|
-
]
|
|
371
|
-
]
|
|
372
|
-
},
|
|
373
335
|
{
|
|
374
336
|
"id": "a342bcf840361d49",
|
|
375
337
|
"type": "comment",
|
|
@@ -386,7 +348,7 @@
|
|
|
386
348
|
"type": "function",
|
|
387
349
|
"z": "78b174792ca9efaf",
|
|
388
350
|
"g": "6ada9879e91ef156",
|
|
389
|
-
"name": "structure file",
|
|
351
|
+
"name": "structure file payload",
|
|
390
352
|
"func": "msg.payload = {\n \"file\": msg.payload,\n \"purpose\": \"assistants\",\n \"filename\": msg.filename\n};\nreturn msg;",
|
|
391
353
|
"outputs": 1,
|
|
392
354
|
"timeout": 0,
|
|
@@ -394,27 +356,11 @@
|
|
|
394
356
|
"initialize": "",
|
|
395
357
|
"finalize": "",
|
|
396
358
|
"libs": [],
|
|
397
|
-
"x":
|
|
359
|
+
"x": 800,
|
|
398
360
|
"y": 220,
|
|
399
361
|
"wires": [
|
|
400
362
|
[
|
|
401
|
-
"
|
|
402
|
-
]
|
|
403
|
-
]
|
|
404
|
-
},
|
|
405
|
-
{
|
|
406
|
-
"id": "43d56c48fd18dd0b",
|
|
407
|
-
"type": "OpenAI API",
|
|
408
|
-
"z": "78b174792ca9efaf",
|
|
409
|
-
"g": "a08cc5475a20cc70",
|
|
410
|
-
"name": "create assistant",
|
|
411
|
-
"service": "39eba92e93450944",
|
|
412
|
-
"method": "createAssistant",
|
|
413
|
-
"x": 560,
|
|
414
|
-
"y": 380,
|
|
415
|
-
"wires": [
|
|
416
|
-
[
|
|
417
|
-
"a1dd9dd38256bc37"
|
|
363
|
+
"faf6244b17ba1131"
|
|
418
364
|
]
|
|
419
365
|
]
|
|
420
366
|
},
|
|
@@ -438,5 +384,37 @@
|
|
|
438
384
|
"x": 180,
|
|
439
385
|
"y": 80,
|
|
440
386
|
"wires": []
|
|
387
|
+
},
|
|
388
|
+
{
|
|
389
|
+
"id": "faf6244b17ba1131",
|
|
390
|
+
"type": "OpenAI API",
|
|
391
|
+
"z": "78b174792ca9efaf",
|
|
392
|
+
"g": "6ada9879e91ef156",
|
|
393
|
+
"name": "upload file",
|
|
394
|
+
"service": "",
|
|
395
|
+
"method": "createFile",
|
|
396
|
+
"x": 1010,
|
|
397
|
+
"y": 220,
|
|
398
|
+
"wires": [
|
|
399
|
+
[
|
|
400
|
+
"e78656f2a1db4141"
|
|
401
|
+
]
|
|
402
|
+
]
|
|
403
|
+
},
|
|
404
|
+
{
|
|
405
|
+
"id": "a319c0690ad183bc",
|
|
406
|
+
"type": "OpenAI API",
|
|
407
|
+
"z": "78b174792ca9efaf",
|
|
408
|
+
"g": "a08cc5475a20cc70",
|
|
409
|
+
"name": "create assistant",
|
|
410
|
+
"service": "",
|
|
411
|
+
"method": "createAssistant",
|
|
412
|
+
"x": 560,
|
|
413
|
+
"y": 380,
|
|
414
|
+
"wires": [
|
|
415
|
+
[
|
|
416
|
+
"a1dd9dd38256bc37"
|
|
417
|
+
]
|
|
418
|
+
]
|
|
441
419
|
}
|
|
442
420
|
]
|
package/examples/audio.json
CHANGED
|
@@ -1,25 +1,75 @@
|
|
|
1
1
|
[
|
|
2
2
|
{
|
|
3
|
-
"id": "
|
|
3
|
+
"id": "8a949045c2bde44f",
|
|
4
4
|
"type": "tab",
|
|
5
|
-
"label": "Audio
|
|
5
|
+
"label": "Audio Examples",
|
|
6
6
|
"disabled": false,
|
|
7
7
|
"info": "",
|
|
8
8
|
"env": []
|
|
9
9
|
},
|
|
10
10
|
{
|
|
11
|
-
"id": "
|
|
11
|
+
"id": "cfc4e326cf246fe9",
|
|
12
|
+
"type": "group",
|
|
13
|
+
"z": "8a949045c2bde44f",
|
|
14
|
+
"style": {
|
|
15
|
+
"stroke": "#999999",
|
|
16
|
+
"stroke-opacity": "1",
|
|
17
|
+
"fill": "none",
|
|
18
|
+
"fill-opacity": "1",
|
|
19
|
+
"label": true,
|
|
20
|
+
"label-position": "nw",
|
|
21
|
+
"color": "#a4a4a4"
|
|
22
|
+
},
|
|
23
|
+
"nodes": [
|
|
24
|
+
"fe06a0eb68e7942b",
|
|
25
|
+
"dfaea51753a120f1",
|
|
26
|
+
"3bf87f7cccba7d76",
|
|
27
|
+
"378ed95ad08397c6"
|
|
28
|
+
],
|
|
29
|
+
"x": 154,
|
|
30
|
+
"y": 139,
|
|
31
|
+
"w": 572,
|
|
32
|
+
"h": 142
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"id": "3b463393064f49b9",
|
|
36
|
+
"type": "group",
|
|
37
|
+
"z": "8a949045c2bde44f",
|
|
38
|
+
"style": {
|
|
39
|
+
"stroke": "#999999",
|
|
40
|
+
"stroke-opacity": "1",
|
|
41
|
+
"fill": "none",
|
|
42
|
+
"fill-opacity": "1",
|
|
43
|
+
"label": true,
|
|
44
|
+
"label-position": "nw",
|
|
45
|
+
"color": "#a4a4a4"
|
|
46
|
+
},
|
|
47
|
+
"nodes": [
|
|
48
|
+
"adbe3dd2124bd65e",
|
|
49
|
+
"254e24ddcedb56fb",
|
|
50
|
+
"ea94f3df99cb5ad9",
|
|
51
|
+
"c870615f02a9f85e",
|
|
52
|
+
"c09d2cb245a00b1d"
|
|
53
|
+
],
|
|
54
|
+
"x": 154,
|
|
55
|
+
"y": 339,
|
|
56
|
+
"w": 752,
|
|
57
|
+
"h": 142
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"id": "fe06a0eb68e7942b",
|
|
12
61
|
"type": "inject",
|
|
13
|
-
"z": "
|
|
14
|
-
"
|
|
62
|
+
"z": "8a949045c2bde44f",
|
|
63
|
+
"g": "cfc4e326cf246fe9",
|
|
64
|
+
"name": "request",
|
|
15
65
|
"props": [
|
|
16
66
|
{
|
|
17
|
-
"p": "
|
|
18
|
-
"v": "/path/to/
|
|
67
|
+
"p": "payload.file",
|
|
68
|
+
"v": "/path/to/my/input-file.mp3",
|
|
19
69
|
"vt": "str"
|
|
20
70
|
},
|
|
21
71
|
{
|
|
22
|
-
"p": "model",
|
|
72
|
+
"p": "payload.model",
|
|
23
73
|
"v": "whisper-1",
|
|
24
74
|
"vt": "str"
|
|
25
75
|
}
|
|
@@ -29,94 +79,163 @@
|
|
|
29
79
|
"once": false,
|
|
30
80
|
"onceDelay": 0.1,
|
|
31
81
|
"topic": "",
|
|
32
|
-
"x":
|
|
33
|
-
"y":
|
|
82
|
+
"x": 250,
|
|
83
|
+
"y": 240,
|
|
84
|
+
"wires": [
|
|
85
|
+
[
|
|
86
|
+
"378ed95ad08397c6"
|
|
87
|
+
]
|
|
88
|
+
]
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
"id": "dfaea51753a120f1",
|
|
92
|
+
"type": "debug",
|
|
93
|
+
"z": "8a949045c2bde44f",
|
|
94
|
+
"g": "cfc4e326cf246fe9",
|
|
95
|
+
"name": "Response",
|
|
96
|
+
"active": true,
|
|
97
|
+
"tosidebar": true,
|
|
98
|
+
"console": false,
|
|
99
|
+
"tostatus": false,
|
|
100
|
+
"complete": "payload",
|
|
101
|
+
"targetType": "msg",
|
|
102
|
+
"statusVal": "",
|
|
103
|
+
"statusType": "auto",
|
|
104
|
+
"x": 620,
|
|
105
|
+
"y": 240,
|
|
106
|
+
"wires": []
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
"id": "3bf87f7cccba7d76",
|
|
110
|
+
"type": "comment",
|
|
111
|
+
"z": "8a949045c2bde44f",
|
|
112
|
+
"g": "cfc4e326cf246fe9",
|
|
113
|
+
"name": "Create Translation",
|
|
114
|
+
"info": "",
|
|
115
|
+
"x": 270,
|
|
116
|
+
"y": 180,
|
|
117
|
+
"wires": []
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
"id": "adbe3dd2124bd65e",
|
|
121
|
+
"type": "inject",
|
|
122
|
+
"z": "8a949045c2bde44f",
|
|
123
|
+
"g": "3b463393064f49b9",
|
|
124
|
+
"name": "request",
|
|
125
|
+
"props": [
|
|
126
|
+
{
|
|
127
|
+
"p": "payload.model",
|
|
128
|
+
"v": "tts-1",
|
|
129
|
+
"vt": "str"
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
"p": "payload.input",
|
|
133
|
+
"v": "Hello world!",
|
|
134
|
+
"vt": "str"
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
"p": "payload.voice",
|
|
138
|
+
"v": "onyx",
|
|
139
|
+
"vt": "str"
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
"p": "filename",
|
|
143
|
+
"v": "/path/to/my/output-file.mp3",
|
|
144
|
+
"vt": "str"
|
|
145
|
+
}
|
|
146
|
+
],
|
|
147
|
+
"repeat": "",
|
|
148
|
+
"crontab": "",
|
|
149
|
+
"once": false,
|
|
150
|
+
"onceDelay": 0.1,
|
|
151
|
+
"topic": "",
|
|
152
|
+
"x": 250,
|
|
153
|
+
"y": 440,
|
|
34
154
|
"wires": [
|
|
35
155
|
[
|
|
36
|
-
"
|
|
156
|
+
"c870615f02a9f85e"
|
|
37
157
|
]
|
|
38
158
|
]
|
|
39
159
|
},
|
|
40
160
|
{
|
|
41
|
-
"id": "
|
|
161
|
+
"id": "378ed95ad08397c6",
|
|
42
162
|
"type": "OpenAI API",
|
|
43
|
-
"z": "
|
|
44
|
-
"
|
|
45
|
-
"
|
|
163
|
+
"z": "8a949045c2bde44f",
|
|
164
|
+
"g": "cfc4e326cf246fe9",
|
|
165
|
+
"name": "Create Translation",
|
|
166
|
+
"service": "",
|
|
46
167
|
"method": "createTranslation",
|
|
47
|
-
"x":
|
|
48
|
-
"y":
|
|
168
|
+
"x": 430,
|
|
169
|
+
"y": 240,
|
|
49
170
|
"wires": [
|
|
50
171
|
[
|
|
51
|
-
"
|
|
172
|
+
"dfaea51753a120f1"
|
|
52
173
|
]
|
|
53
174
|
]
|
|
54
175
|
},
|
|
55
176
|
{
|
|
56
|
-
"id": "
|
|
177
|
+
"id": "254e24ddcedb56fb",
|
|
178
|
+
"type": "file",
|
|
179
|
+
"z": "8a949045c2bde44f",
|
|
180
|
+
"g": "3b463393064f49b9",
|
|
181
|
+
"name": "save audio file",
|
|
182
|
+
"filename": "filename",
|
|
183
|
+
"filenameType": "msg",
|
|
184
|
+
"appendNewline": false,
|
|
185
|
+
"createDir": false,
|
|
186
|
+
"overwriteFile": "true",
|
|
187
|
+
"encoding": "none",
|
|
188
|
+
"x": 620,
|
|
189
|
+
"y": 440,
|
|
190
|
+
"wires": [
|
|
191
|
+
[
|
|
192
|
+
"ea94f3df99cb5ad9"
|
|
193
|
+
]
|
|
194
|
+
]
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
"id": "ea94f3df99cb5ad9",
|
|
57
198
|
"type": "debug",
|
|
58
|
-
"z": "
|
|
199
|
+
"z": "8a949045c2bde44f",
|
|
200
|
+
"g": "3b463393064f49b9",
|
|
59
201
|
"name": "response",
|
|
60
202
|
"active": true,
|
|
61
203
|
"tosidebar": true,
|
|
62
204
|
"console": false,
|
|
63
205
|
"tostatus": false,
|
|
64
|
-
"complete": "
|
|
65
|
-
"targetType": "
|
|
206
|
+
"complete": "true",
|
|
207
|
+
"targetType": "full",
|
|
66
208
|
"statusVal": "",
|
|
67
209
|
"statusType": "auto",
|
|
68
|
-
"x":
|
|
69
|
-
"y":
|
|
210
|
+
"x": 800,
|
|
211
|
+
"y": 440,
|
|
70
212
|
"wires": []
|
|
71
213
|
},
|
|
72
214
|
{
|
|
73
|
-
"id": "
|
|
74
|
-
"type": "
|
|
75
|
-
"z": "
|
|
76
|
-
"
|
|
77
|
-
"
|
|
78
|
-
"
|
|
79
|
-
"
|
|
80
|
-
"
|
|
81
|
-
"
|
|
82
|
-
"encoding": "utf-16be",
|
|
83
|
-
"allProps": false,
|
|
84
|
-
"x": 380,
|
|
85
|
-
"y": 260,
|
|
215
|
+
"id": "c870615f02a9f85e",
|
|
216
|
+
"type": "OpenAI API",
|
|
217
|
+
"z": "8a949045c2bde44f",
|
|
218
|
+
"g": "3b463393064f49b9",
|
|
219
|
+
"name": "create speech",
|
|
220
|
+
"service": "",
|
|
221
|
+
"method": "createSpeech",
|
|
222
|
+
"x": 420,
|
|
223
|
+
"y": 440,
|
|
86
224
|
"wires": [
|
|
87
225
|
[
|
|
88
|
-
"
|
|
226
|
+
"254e24ddcedb56fb"
|
|
89
227
|
]
|
|
90
228
|
]
|
|
91
229
|
},
|
|
92
230
|
{
|
|
93
|
-
"id": "
|
|
231
|
+
"id": "c09d2cb245a00b1d",
|
|
94
232
|
"type": "comment",
|
|
95
|
-
"z": "
|
|
96
|
-
"
|
|
233
|
+
"z": "8a949045c2bde44f",
|
|
234
|
+
"g": "3b463393064f49b9",
|
|
235
|
+
"name": "Create Speech",
|
|
97
236
|
"info": "",
|
|
98
|
-
"x":
|
|
99
|
-
"y":
|
|
237
|
+
"x": 260,
|
|
238
|
+
"y": 380,
|
|
100
239
|
"wires": []
|
|
101
|
-
},
|
|
102
|
-
{
|
|
103
|
-
"id": "6e882571ec7d2180",
|
|
104
|
-
"type": "function",
|
|
105
|
-
"z": "a8f46f8122644718",
|
|
106
|
-
"name": "structure payload",
|
|
107
|
-
"func": "let newPayload = {};\n\nnewPayload.file = msg.payload;\nnewPayload.model = msg.model;\nnewPayload.filename = msg.filename;\n\nmsg.payload = newPayload;\n\ndelete msg.model;\ndelete msg.filename;\n\nreturn msg;",
|
|
108
|
-
"outputs": 1,
|
|
109
|
-
"timeout": 0,
|
|
110
|
-
"noerr": 0,
|
|
111
|
-
"initialize": "",
|
|
112
|
-
"finalize": "",
|
|
113
|
-
"libs": [],
|
|
114
|
-
"x": 570,
|
|
115
|
-
"y": 260,
|
|
116
|
-
"wires": [
|
|
117
|
-
[
|
|
118
|
-
"72303cea19bd9de9"
|
|
119
|
-
]
|
|
120
|
-
]
|
|
121
240
|
}
|
|
122
241
|
]
|