@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/examples/files.json
CHANGED
|
@@ -1,71 +1,109 @@
|
|
|
1
1
|
[
|
|
2
2
|
{
|
|
3
|
-
"id": "
|
|
3
|
+
"id": "c95856327794f489",
|
|
4
4
|
"type": "tab",
|
|
5
|
-
"label": "
|
|
5
|
+
"label": "File Examples",
|
|
6
6
|
"disabled": false,
|
|
7
7
|
"info": "",
|
|
8
8
|
"env": []
|
|
9
9
|
},
|
|
10
10
|
{
|
|
11
|
-
"id": "
|
|
12
|
-
"type": "
|
|
13
|
-
"z": "
|
|
14
|
-
"
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
11
|
+
"id": "2eb6bac23f83d38b",
|
|
12
|
+
"type": "group",
|
|
13
|
+
"z": "c95856327794f489",
|
|
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
|
+
"54186a1f39edeeac",
|
|
25
|
+
"c9e22fbc2113f3a0",
|
|
26
|
+
"cff979baa8adcc5d",
|
|
27
|
+
"90a86dfe209b300e"
|
|
28
|
+
],
|
|
29
|
+
"x": 94,
|
|
30
|
+
"y": 139,
|
|
31
|
+
"w": 672,
|
|
32
|
+
"h": 142
|
|
19
33
|
},
|
|
20
34
|
{
|
|
21
|
-
"id": "
|
|
35
|
+
"id": "54186a1f39edeeac",
|
|
22
36
|
"type": "inject",
|
|
23
|
-
"z": "
|
|
24
|
-
"
|
|
25
|
-
"
|
|
37
|
+
"z": "c95856327794f489",
|
|
38
|
+
"g": "2eb6bac23f83d38b",
|
|
39
|
+
"name": "File Reference",
|
|
40
|
+
"props": [
|
|
41
|
+
{
|
|
42
|
+
"p": "payload.file",
|
|
43
|
+
"v": "/path/to/my/file.txt",
|
|
44
|
+
"vt": "str"
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"p": "payload.purpose",
|
|
48
|
+
"v": "assistants",
|
|
49
|
+
"vt": "str"
|
|
50
|
+
}
|
|
51
|
+
],
|
|
26
52
|
"repeat": "",
|
|
27
53
|
"crontab": "",
|
|
28
54
|
"once": false,
|
|
29
55
|
"onceDelay": 0.1,
|
|
30
56
|
"topic": "",
|
|
31
|
-
"x":
|
|
32
|
-
"y":
|
|
57
|
+
"x": 220,
|
|
58
|
+
"y": 240,
|
|
33
59
|
"wires": [
|
|
34
60
|
[
|
|
35
|
-
"
|
|
61
|
+
"90a86dfe209b300e"
|
|
36
62
|
]
|
|
37
|
-
]
|
|
38
|
-
"l": false
|
|
63
|
+
]
|
|
39
64
|
},
|
|
40
65
|
{
|
|
41
|
-
"id": "
|
|
66
|
+
"id": "c9e22fbc2113f3a0",
|
|
42
67
|
"type": "debug",
|
|
43
|
-
"z": "
|
|
44
|
-
"
|
|
68
|
+
"z": "c95856327794f489",
|
|
69
|
+
"g": "2eb6bac23f83d38b",
|
|
70
|
+
"name": "Response",
|
|
45
71
|
"active": true,
|
|
46
72
|
"tosidebar": true,
|
|
47
73
|
"console": false,
|
|
48
74
|
"tostatus": false,
|
|
49
|
-
"complete": "payload
|
|
75
|
+
"complete": "payload",
|
|
50
76
|
"targetType": "msg",
|
|
51
77
|
"statusVal": "",
|
|
52
78
|
"statusType": "auto",
|
|
53
|
-
"x":
|
|
54
|
-
"y":
|
|
79
|
+
"x": 660,
|
|
80
|
+
"y": 240,
|
|
81
|
+
"wires": []
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"id": "cff979baa8adcc5d",
|
|
85
|
+
"type": "comment",
|
|
86
|
+
"z": "c95856327794f489",
|
|
87
|
+
"g": "2eb6bac23f83d38b",
|
|
88
|
+
"name": "Upload Single File",
|
|
89
|
+
"info": "",
|
|
90
|
+
"x": 210,
|
|
91
|
+
"y": 180,
|
|
55
92
|
"wires": []
|
|
56
93
|
},
|
|
57
94
|
{
|
|
58
|
-
"id": "
|
|
95
|
+
"id": "90a86dfe209b300e",
|
|
59
96
|
"type": "OpenAI API",
|
|
60
|
-
"z": "
|
|
61
|
-
"
|
|
97
|
+
"z": "c95856327794f489",
|
|
98
|
+
"g": "2eb6bac23f83d38b",
|
|
99
|
+
"name": "Uplad File",
|
|
62
100
|
"service": "",
|
|
63
|
-
"method": "
|
|
64
|
-
"x":
|
|
65
|
-
"y":
|
|
101
|
+
"method": "createFile",
|
|
102
|
+
"x": 440,
|
|
103
|
+
"y": 240,
|
|
66
104
|
"wires": [
|
|
67
105
|
[
|
|
68
|
-
"
|
|
106
|
+
"c9e22fbc2113f3a0"
|
|
69
107
|
]
|
|
70
108
|
]
|
|
71
109
|
}
|
package/examples/images.json
CHANGED
|
@@ -1,26 +1,51 @@
|
|
|
1
1
|
[
|
|
2
2
|
{
|
|
3
|
-
"id": "
|
|
3
|
+
"id": "dc40eecb9611dce6",
|
|
4
4
|
"type": "tab",
|
|
5
|
-
"label": "
|
|
5
|
+
"label": "Image Examples",
|
|
6
6
|
"disabled": false,
|
|
7
7
|
"info": "",
|
|
8
8
|
"env": []
|
|
9
9
|
},
|
|
10
10
|
{
|
|
11
|
-
"id": "
|
|
11
|
+
"id": "610413b8d258c093",
|
|
12
|
+
"type": "group",
|
|
13
|
+
"z": "dc40eecb9611dce6",
|
|
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
|
+
"d463be1fb4f4b316",
|
|
25
|
+
"defe047606001648",
|
|
26
|
+
"4e5290689cc38e3f",
|
|
27
|
+
"1ba407d00dd42425"
|
|
28
|
+
],
|
|
29
|
+
"x": 114,
|
|
30
|
+
"y": 139,
|
|
31
|
+
"w": 592,
|
|
32
|
+
"h": 142
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"id": "d463be1fb4f4b316",
|
|
12
36
|
"type": "inject",
|
|
13
|
-
"z": "
|
|
14
|
-
"
|
|
37
|
+
"z": "dc40eecb9611dce6",
|
|
38
|
+
"g": "610413b8d258c093",
|
|
39
|
+
"name": "file details",
|
|
15
40
|
"props": [
|
|
16
41
|
{
|
|
17
|
-
"p": "payload.
|
|
18
|
-
"v": "
|
|
42
|
+
"p": "payload.image",
|
|
43
|
+
"v": "/path/to/my/image/png",
|
|
19
44
|
"vt": "str"
|
|
20
45
|
},
|
|
21
46
|
{
|
|
22
|
-
"p": "payload.
|
|
23
|
-
"v": "
|
|
47
|
+
"p": "payload.prompt",
|
|
48
|
+
"v": "A graphic design logo with a blue dot in the middle.",
|
|
24
49
|
"vt": "str"
|
|
25
50
|
}
|
|
26
51
|
],
|
|
@@ -29,18 +54,19 @@
|
|
|
29
54
|
"once": false,
|
|
30
55
|
"onceDelay": 0.1,
|
|
31
56
|
"topic": "",
|
|
32
|
-
"x":
|
|
33
|
-
"y":
|
|
57
|
+
"x": 220,
|
|
58
|
+
"y": 240,
|
|
34
59
|
"wires": [
|
|
35
60
|
[
|
|
36
|
-
"
|
|
61
|
+
"1ba407d00dd42425"
|
|
37
62
|
]
|
|
38
63
|
]
|
|
39
64
|
},
|
|
40
65
|
{
|
|
41
|
-
"id": "
|
|
66
|
+
"id": "defe047606001648",
|
|
42
67
|
"type": "debug",
|
|
43
|
-
"z": "
|
|
68
|
+
"z": "dc40eecb9611dce6",
|
|
69
|
+
"g": "610413b8d258c093",
|
|
44
70
|
"name": "response",
|
|
45
71
|
"active": true,
|
|
46
72
|
"tosidebar": true,
|
|
@@ -50,32 +76,34 @@
|
|
|
50
76
|
"targetType": "msg",
|
|
51
77
|
"statusVal": "",
|
|
52
78
|
"statusType": "auto",
|
|
53
|
-
"x":
|
|
54
|
-
"y":
|
|
79
|
+
"x": 600,
|
|
80
|
+
"y": 240,
|
|
55
81
|
"wires": []
|
|
56
82
|
},
|
|
57
83
|
{
|
|
58
|
-
"id": "
|
|
84
|
+
"id": "4e5290689cc38e3f",
|
|
59
85
|
"type": "comment",
|
|
60
|
-
"z": "
|
|
61
|
-
"
|
|
86
|
+
"z": "dc40eecb9611dce6",
|
|
87
|
+
"g": "610413b8d258c093",
|
|
88
|
+
"name": "Create Image Edit",
|
|
62
89
|
"info": "",
|
|
63
|
-
"x":
|
|
64
|
-
"y":
|
|
90
|
+
"x": 230,
|
|
91
|
+
"y": 180,
|
|
65
92
|
"wires": []
|
|
66
93
|
},
|
|
67
94
|
{
|
|
68
|
-
"id": "
|
|
95
|
+
"id": "1ba407d00dd42425",
|
|
69
96
|
"type": "OpenAI API",
|
|
70
|
-
"z": "
|
|
71
|
-
"
|
|
97
|
+
"z": "dc40eecb9611dce6",
|
|
98
|
+
"g": "610413b8d258c093",
|
|
99
|
+
"name": "create image edit",
|
|
72
100
|
"service": "",
|
|
73
|
-
"method": "
|
|
74
|
-
"x":
|
|
75
|
-
"y":
|
|
101
|
+
"method": "createImageEdit",
|
|
102
|
+
"x": 410,
|
|
103
|
+
"y": 240,
|
|
76
104
|
"wires": [
|
|
77
105
|
[
|
|
78
|
-
"
|
|
106
|
+
"defe047606001648"
|
|
79
107
|
]
|
|
80
108
|
]
|
|
81
109
|
}
|