vectorvein 0.1.80__py3-none-any.whl → 0.1.82__py3-none-any.whl
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.
- vectorvein/chat_clients/openai_compatible_client.py +120 -12
- vectorvein/workflow/graph/edge.py +36 -0
- vectorvein/workflow/graph/node.py +82 -0
- vectorvein/workflow/graph/port.py +173 -0
- vectorvein/workflow/graph/workflow.py +87 -0
- vectorvein/workflow/nodes/__init__.py +136 -0
- vectorvein/workflow/nodes/audio_generation.py +154 -0
- vectorvein/workflow/nodes/control_flows.py +170 -0
- vectorvein/workflow/nodes/file_processing.py +106 -0
- vectorvein/workflow/nodes/image_generation.py +743 -0
- vectorvein/workflow/nodes/llms.py +802 -0
- vectorvein/workflow/nodes/media_editing.py +668 -0
- vectorvein/workflow/nodes/media_processing.py +478 -0
- vectorvein/workflow/nodes/output.py +357 -0
- vectorvein/workflow/nodes/relational_db.py +153 -0
- vectorvein/workflow/nodes/text_processing.py +218 -0
- vectorvein/workflow/nodes/tools.py +331 -0
- vectorvein/workflow/nodes/triggers.py +0 -0
- vectorvein/workflow/nodes/vector_db.py +156 -0
- vectorvein/workflow/nodes/video_generation.py +113 -0
- vectorvein/workflow/nodes/web_crawlers.py +157 -0
- vectorvein/workflow/utils/json_to_code.py +191 -0
- {vectorvein-0.1.80.dist-info → vectorvein-0.1.82.dist-info}/METADATA +1 -1
- {vectorvein-0.1.80.dist-info → vectorvein-0.1.82.dist-info}/RECORD +26 -5
- {vectorvein-0.1.80.dist-info → vectorvein-0.1.82.dist-info}/WHEEL +0 -0
- {vectorvein-0.1.80.dist-info → vectorvein-0.1.82.dist-info}/entry_points.txt +0 -0
@@ -0,0 +1,136 @@
|
|
1
|
+
from .audio_generation import MinimaxMusicGeneration, SoundEffects, Tts
|
2
|
+
from .control_flows import Conditional, Empty, HumanFeedback, JsonProcess, RandomChoice
|
3
|
+
from .file_processing import FileLoader, FileUpload
|
4
|
+
from .image_generation import BackgroundGeneration, DallE, Flux1, Inpainting, Kolors, Pulid, Recraft, StableDiffusion
|
5
|
+
from .llms import (
|
6
|
+
AliyunQwen,
|
7
|
+
BaiduWenxin,
|
8
|
+
ChatGLM,
|
9
|
+
Claude,
|
10
|
+
Deepseek,
|
11
|
+
Gemini,
|
12
|
+
LingYiWanWu,
|
13
|
+
MiniMax,
|
14
|
+
Moonshot,
|
15
|
+
OpenAI,
|
16
|
+
XAi,
|
17
|
+
)
|
18
|
+
from .media_editing import (
|
19
|
+
AudioEditing,
|
20
|
+
ImageBackgroundRemoval,
|
21
|
+
ImageEditing,
|
22
|
+
ImageSegmentation,
|
23
|
+
ImageWatermark,
|
24
|
+
VideoEditing,
|
25
|
+
VideoScreenshot,
|
26
|
+
)
|
27
|
+
from .media_processing import (
|
28
|
+
ClaudeVision,
|
29
|
+
DeepseekVl,
|
30
|
+
GeminiVision,
|
31
|
+
GlmVision,
|
32
|
+
GptVision,
|
33
|
+
InternVision,
|
34
|
+
Ocr,
|
35
|
+
QwenVision,
|
36
|
+
SpeechRecognition,
|
37
|
+
)
|
38
|
+
from .output import Audio, Text, Table, Document, Echarts, Email, Html, Mermaid, Mindmap, PictureRender
|
39
|
+
from .relational_db import GetTableInfo, RunSql, SmartQuery
|
40
|
+
from .text_processing import (
|
41
|
+
TextInOut,
|
42
|
+
TextReplace,
|
43
|
+
TextSplitters,
|
44
|
+
TextTruncation,
|
45
|
+
MarkdownToHtml,
|
46
|
+
ListRender,
|
47
|
+
TemplateCompose,
|
48
|
+
)
|
49
|
+
from .tools import CodebaseAnalysis, TextTranslation, TextSearch, ProgrammingFunction, ImageSearch, WorkflowInvoke
|
50
|
+
from .vector_db import VectorDbAddData, VectorDbDeleteData, VectorDbSearchData
|
51
|
+
from .video_generation import KlingVideo, CogVideoX
|
52
|
+
from .web_crawlers import TextCrawler, BilibiliCrawler, DouyinCrawler, YoutubeCrawler
|
53
|
+
|
54
|
+
|
55
|
+
__all__ = [
|
56
|
+
"AliyunQwen",
|
57
|
+
"Audio",
|
58
|
+
"AudioEditing",
|
59
|
+
"BackgroundGeneration",
|
60
|
+
"BaiduWenxin",
|
61
|
+
"BilibiliCrawler",
|
62
|
+
"ChatGLM",
|
63
|
+
"Claude",
|
64
|
+
"ClaudeVision",
|
65
|
+
"CodebaseAnalysis",
|
66
|
+
"CogVideoX",
|
67
|
+
"Conditional",
|
68
|
+
"DallE",
|
69
|
+
"Deepseek",
|
70
|
+
"DeepseekVl",
|
71
|
+
"Document",
|
72
|
+
"DouyinCrawler",
|
73
|
+
"Echarts",
|
74
|
+
"Email",
|
75
|
+
"Empty",
|
76
|
+
"FileLoader",
|
77
|
+
"FileUpload",
|
78
|
+
"Flux1",
|
79
|
+
"Gemini",
|
80
|
+
"GeminiVision",
|
81
|
+
"GetTableInfo",
|
82
|
+
"GlmVision",
|
83
|
+
"GptVision",
|
84
|
+
"Html",
|
85
|
+
"HumanFeedback",
|
86
|
+
"ImageBackgroundRemoval",
|
87
|
+
"ImageEditing",
|
88
|
+
"ImageSearch",
|
89
|
+
"ImageSegmentation",
|
90
|
+
"ImageWatermark",
|
91
|
+
"Inpainting",
|
92
|
+
"InternVision",
|
93
|
+
"JsonProcess",
|
94
|
+
"KlingVideo",
|
95
|
+
"Kolors",
|
96
|
+
"LingYiWanWu",
|
97
|
+
"ListRender",
|
98
|
+
"MarkdownToHtml",
|
99
|
+
"Mermaid",
|
100
|
+
"Mindmap",
|
101
|
+
"MiniMax",
|
102
|
+
"MinimaxMusicGeneration",
|
103
|
+
"Moonshot",
|
104
|
+
"Ocr",
|
105
|
+
"OpenAI",
|
106
|
+
"PictureRender",
|
107
|
+
"ProgrammingFunction",
|
108
|
+
"Pulid",
|
109
|
+
"QwenVision",
|
110
|
+
"RandomChoice",
|
111
|
+
"Recraft",
|
112
|
+
"RunSql",
|
113
|
+
"SmartQuery",
|
114
|
+
"SoundEffects",
|
115
|
+
"SpeechRecognition",
|
116
|
+
"StableDiffusion",
|
117
|
+
"Table",
|
118
|
+
"TemplateCompose",
|
119
|
+
"Text",
|
120
|
+
"TextCrawler",
|
121
|
+
"TextInOut",
|
122
|
+
"TextReplace",
|
123
|
+
"TextSearch",
|
124
|
+
"TextSplitters",
|
125
|
+
"TextTranslation",
|
126
|
+
"TextTruncation",
|
127
|
+
"Tts",
|
128
|
+
"VectorDbAddData",
|
129
|
+
"VectorDbDeleteData",
|
130
|
+
"VectorDbSearchData",
|
131
|
+
"VideoEditing",
|
132
|
+
"VideoScreenshot",
|
133
|
+
"WorkflowInvoke",
|
134
|
+
"XAi",
|
135
|
+
"YoutubeCrawler",
|
136
|
+
]
|
@@ -0,0 +1,154 @@
|
|
1
|
+
from typing import Optional
|
2
|
+
|
3
|
+
from ..graph.node import Node
|
4
|
+
from ..graph.port import PortType, InputPort, OutputPort
|
5
|
+
|
6
|
+
|
7
|
+
class MinimaxMusicGeneration(Node):
|
8
|
+
def __init__(self, id: Optional[str] = None):
|
9
|
+
super().__init__(
|
10
|
+
node_type="MinimaxMusicGeneration",
|
11
|
+
category="audio_generation",
|
12
|
+
task_name="audio_generation.minimax_music_generation",
|
13
|
+
node_id=id,
|
14
|
+
ports={
|
15
|
+
"audio_file": InputPort(
|
16
|
+
name="audio_file",
|
17
|
+
port_type=PortType.FILE,
|
18
|
+
value=list(),
|
19
|
+
support_file_types=[".wav", ".mp3"],
|
20
|
+
),
|
21
|
+
"purpose": InputPort(
|
22
|
+
name="purpose",
|
23
|
+
port_type=PortType.SELECT,
|
24
|
+
value="song",
|
25
|
+
options=[
|
26
|
+
{"value": "song", "label": "song"},
|
27
|
+
{"value": "voice", "label": "voice"},
|
28
|
+
{"value": "instrumental", "label": "instrumental"},
|
29
|
+
],
|
30
|
+
),
|
31
|
+
"lyrics": InputPort(
|
32
|
+
name="lyrics",
|
33
|
+
port_type=PortType.TEXTAREA,
|
34
|
+
value="",
|
35
|
+
max_length=200,
|
36
|
+
),
|
37
|
+
"model": InputPort(
|
38
|
+
name="model",
|
39
|
+
port_type=PortType.SELECT,
|
40
|
+
value="music-01",
|
41
|
+
options=[{"value": "music-01", "label": "music-01"}],
|
42
|
+
),
|
43
|
+
"sample_rate": InputPort(
|
44
|
+
name="sample_rate",
|
45
|
+
port_type=PortType.SELECT,
|
46
|
+
value=44100,
|
47
|
+
options=[
|
48
|
+
{"value": 16000, "label": "16000"},
|
49
|
+
{"value": 24000, "label": "24000"},
|
50
|
+
{"value": 32000, "label": "32000"},
|
51
|
+
{"value": 44100, "label": "44100"},
|
52
|
+
],
|
53
|
+
),
|
54
|
+
"bitrate": InputPort(
|
55
|
+
name="bitrate",
|
56
|
+
port_type=PortType.SELECT,
|
57
|
+
value=256000,
|
58
|
+
options=[
|
59
|
+
{"value": 32000, "label": "32000"},
|
60
|
+
{"value": 64000, "label": "64000"},
|
61
|
+
{"value": 128000, "label": "128000"},
|
62
|
+
{"value": 256000, "label": "256000"},
|
63
|
+
],
|
64
|
+
),
|
65
|
+
"format": InputPort(
|
66
|
+
name="format",
|
67
|
+
port_type=PortType.SELECT,
|
68
|
+
value="mp3",
|
69
|
+
options=[
|
70
|
+
{"value": "mp3", "label": "mp3"},
|
71
|
+
{"value": "wav", "label": "wav"},
|
72
|
+
{"value": "pcm", "label": "pcm"},
|
73
|
+
],
|
74
|
+
),
|
75
|
+
"output_type": OutputPort(
|
76
|
+
name="output_type",
|
77
|
+
port_type=PortType.SELECT,
|
78
|
+
value="only_link",
|
79
|
+
options=[
|
80
|
+
{"value": "only_link", "label": "only_link"},
|
81
|
+
{"value": "html", "label": "html"},
|
82
|
+
],
|
83
|
+
),
|
84
|
+
"output": OutputPort(),
|
85
|
+
},
|
86
|
+
)
|
87
|
+
|
88
|
+
|
89
|
+
class SoundEffects(Node):
|
90
|
+
def __init__(self, id: Optional[str] = None):
|
91
|
+
super().__init__(
|
92
|
+
node_type="SoundEffects",
|
93
|
+
category="audio_generation",
|
94
|
+
task_name="audio_generation.sound_effects",
|
95
|
+
node_id=id,
|
96
|
+
ports={
|
97
|
+
"text": InputPort(
|
98
|
+
name="text",
|
99
|
+
port_type=PortType.TEXTAREA,
|
100
|
+
value="",
|
101
|
+
max_length=50,
|
102
|
+
),
|
103
|
+
"video": InputPort(
|
104
|
+
name="video",
|
105
|
+
port_type=PortType.FILE,
|
106
|
+
value=list(),
|
107
|
+
support_file_types=[".mp4", ".mov", ".webm", ".m4v", ".gif"],
|
108
|
+
),
|
109
|
+
"length": InputPort(
|
110
|
+
name="length",
|
111
|
+
port_type=PortType.NUMBER,
|
112
|
+
value=5,
|
113
|
+
min=1,
|
114
|
+
max=60,
|
115
|
+
),
|
116
|
+
"output_type": OutputPort(
|
117
|
+
name="output_type",
|
118
|
+
port_type=PortType.SELECT,
|
119
|
+
value="only_link",
|
120
|
+
options=[
|
121
|
+
{"value": "only_link", "label": "only_link"},
|
122
|
+
{"value": "html", "label": "html"},
|
123
|
+
],
|
124
|
+
),
|
125
|
+
"output": OutputPort(),
|
126
|
+
},
|
127
|
+
)
|
128
|
+
|
129
|
+
|
130
|
+
class Tts(Node):
|
131
|
+
def __init__(self, id: Optional[str] = None):
|
132
|
+
super().__init__(
|
133
|
+
node_type="Tts",
|
134
|
+
category="audio_generation",
|
135
|
+
task_name="audio_generation.tts",
|
136
|
+
node_id=id,
|
137
|
+
ports={
|
138
|
+
"text": InputPort(
|
139
|
+
name="text",
|
140
|
+
port_type=PortType.TEXTAREA,
|
141
|
+
value="",
|
142
|
+
),
|
143
|
+
"output_type": OutputPort(
|
144
|
+
name="output_type",
|
145
|
+
port_type=PortType.SELECT,
|
146
|
+
value="only_link",
|
147
|
+
options=[
|
148
|
+
{"value": "only_link", "label": "only_link"},
|
149
|
+
{"value": "html", "label": "html"},
|
150
|
+
],
|
151
|
+
),
|
152
|
+
"output": OutputPort(),
|
153
|
+
},
|
154
|
+
)
|
@@ -0,0 +1,170 @@
|
|
1
|
+
from typing import Optional
|
2
|
+
|
3
|
+
from ..graph.node import Node
|
4
|
+
from ..graph.port import PortType, InputPort, OutputPort
|
5
|
+
|
6
|
+
|
7
|
+
class Conditional(Node):
|
8
|
+
def __init__(self, id: Optional[str] = None):
|
9
|
+
super().__init__(
|
10
|
+
node_type="Conditional",
|
11
|
+
category="control_flows",
|
12
|
+
task_name="control_flows.conditional",
|
13
|
+
node_id=id,
|
14
|
+
ports={
|
15
|
+
"field_type": InputPort(
|
16
|
+
name="field_type",
|
17
|
+
port_type=PortType.SELECT,
|
18
|
+
value="string",
|
19
|
+
options=[
|
20
|
+
{"value": "string", "label": "Str"},
|
21
|
+
{"value": "number", "label": "Number"},
|
22
|
+
],
|
23
|
+
),
|
24
|
+
"left_field": InputPort(
|
25
|
+
name="left_field",
|
26
|
+
port_type=PortType.INPUT,
|
27
|
+
value="",
|
28
|
+
),
|
29
|
+
"operator": InputPort(
|
30
|
+
name="operator",
|
31
|
+
port_type=PortType.SELECT,
|
32
|
+
value="equal",
|
33
|
+
options=[
|
34
|
+
{"value": "equal", "label": "equal", "field_type": ["string", "number"]},
|
35
|
+
{"value": "not_equal", "label": "not_equal", "field_type": ["string", "number"]},
|
36
|
+
{"value": "greater_than", "label": "greater_than", "field_type": ["number"]},
|
37
|
+
{"value": "less_than", "label": "less_than", "field_type": ["number"]},
|
38
|
+
{"value": "greater_than_or_equal", "label": "greater_than_or_equal", "field_type": ["number"]},
|
39
|
+
{"value": "less_than_or_equal", "label": "less_than_or_equal", "field_type": ["number"]},
|
40
|
+
{"value": "include", "label": "include", "field_type": ["string"]},
|
41
|
+
{"value": "not_include", "label": "not_include", "field_type": ["string"]},
|
42
|
+
{"value": "is_empty", "label": "is_empty", "field_type": ["string"]},
|
43
|
+
{"value": "is_not_empty", "label": "is_not_empty", "field_type": ["string"]},
|
44
|
+
{"value": "starts_with", "label": "starts_with", "field_type": ["string"]},
|
45
|
+
{"value": "ends_with", "label": "ends_with", "field_type": ["string"]},
|
46
|
+
],
|
47
|
+
),
|
48
|
+
"right_field": InputPort(
|
49
|
+
name="right_field",
|
50
|
+
port_type=PortType.INPUT,
|
51
|
+
value="",
|
52
|
+
),
|
53
|
+
"true_output": InputPort(
|
54
|
+
name="true_output",
|
55
|
+
port_type=PortType.INPUT,
|
56
|
+
value="",
|
57
|
+
),
|
58
|
+
"false_output": InputPort(
|
59
|
+
name="false_output",
|
60
|
+
port_type=PortType.INPUT,
|
61
|
+
value="",
|
62
|
+
),
|
63
|
+
"output": OutputPort(),
|
64
|
+
},
|
65
|
+
)
|
66
|
+
|
67
|
+
|
68
|
+
class Empty(Node):
|
69
|
+
def __init__(self, id: Optional[str] = None):
|
70
|
+
super().__init__(
|
71
|
+
node_type="Empty",
|
72
|
+
category="control_flows",
|
73
|
+
task_name="control_flows.empty",
|
74
|
+
node_id=id,
|
75
|
+
ports={
|
76
|
+
"input": InputPort(
|
77
|
+
name="input",
|
78
|
+
port_type=PortType.INPUT,
|
79
|
+
value="",
|
80
|
+
),
|
81
|
+
"output": OutputPort(),
|
82
|
+
},
|
83
|
+
)
|
84
|
+
|
85
|
+
|
86
|
+
class HumanFeedback(Node):
|
87
|
+
def __init__(self, id: Optional[str] = None):
|
88
|
+
super().__init__(
|
89
|
+
node_type="HumanFeedback",
|
90
|
+
category="control_flows",
|
91
|
+
task_name="control_flows.human_feedback",
|
92
|
+
node_id=id,
|
93
|
+
ports={
|
94
|
+
"hint_message": InputPort(
|
95
|
+
name="hint_message",
|
96
|
+
port_type=PortType.TEXTAREA,
|
97
|
+
value="",
|
98
|
+
),
|
99
|
+
"human_input": InputPort(
|
100
|
+
name="human_input",
|
101
|
+
port_type=PortType.TEXTAREA,
|
102
|
+
value="",
|
103
|
+
),
|
104
|
+
"output": OutputPort(),
|
105
|
+
},
|
106
|
+
)
|
107
|
+
|
108
|
+
|
109
|
+
class JsonProcess(Node):
|
110
|
+
def __init__(self, id: Optional[str] = None):
|
111
|
+
super().__init__(
|
112
|
+
node_type="JsonProcess",
|
113
|
+
category="control_flows",
|
114
|
+
task_name="control_flows.json_process",
|
115
|
+
node_id=id,
|
116
|
+
ports={
|
117
|
+
"input": InputPort(
|
118
|
+
name="input",
|
119
|
+
port_type=PortType.INPUT,
|
120
|
+
value="",
|
121
|
+
),
|
122
|
+
"process_mode": InputPort(
|
123
|
+
name="process_mode",
|
124
|
+
port_type=PortType.SELECT,
|
125
|
+
value="get_value",
|
126
|
+
options=[
|
127
|
+
{"value": "get_value", "label": "get_value"},
|
128
|
+
{"value": "get_multiple_values", "label": "get_multiple_values"},
|
129
|
+
{"value": "list_values", "label": "list_values"},
|
130
|
+
{"value": "list_keys", "label": "list_keys"},
|
131
|
+
],
|
132
|
+
),
|
133
|
+
"key": InputPort(
|
134
|
+
name="key",
|
135
|
+
port_type=PortType.INPUT,
|
136
|
+
value="",
|
137
|
+
condition="return fieldsData.process_mode.value == 'get_value'",
|
138
|
+
),
|
139
|
+
"keys": InputPort(
|
140
|
+
name="keys",
|
141
|
+
port_type=PortType.INPUT,
|
142
|
+
value=list(),
|
143
|
+
),
|
144
|
+
"default_value": InputPort(
|
145
|
+
name="default_value",
|
146
|
+
port_type=PortType.INPUT,
|
147
|
+
value="",
|
148
|
+
condition="return fieldsData.process_mode.value == 'get_value'",
|
149
|
+
),
|
150
|
+
"output": OutputPort(),
|
151
|
+
},
|
152
|
+
)
|
153
|
+
|
154
|
+
|
155
|
+
class RandomChoice(Node):
|
156
|
+
def __init__(self, id: Optional[str] = None):
|
157
|
+
super().__init__(
|
158
|
+
node_type="RandomChoice",
|
159
|
+
category="control_flows",
|
160
|
+
task_name="control_flows.random_choice",
|
161
|
+
node_id=id,
|
162
|
+
ports={
|
163
|
+
"input": InputPort(
|
164
|
+
name="input",
|
165
|
+
port_type=PortType.LIST,
|
166
|
+
value=list(),
|
167
|
+
),
|
168
|
+
"output": OutputPort(),
|
169
|
+
},
|
170
|
+
)
|
@@ -0,0 +1,106 @@
|
|
1
|
+
from typing import Optional
|
2
|
+
|
3
|
+
from ..graph.node import Node
|
4
|
+
from ..graph.port import PortType, InputPort, OutputPort
|
5
|
+
|
6
|
+
|
7
|
+
class FileLoader(Node):
|
8
|
+
def __init__(self, id: Optional[str] = None):
|
9
|
+
super().__init__(
|
10
|
+
node_type="FileLoader",
|
11
|
+
category="file_processing",
|
12
|
+
task_name="file_processing.file_loader",
|
13
|
+
node_id=id,
|
14
|
+
ports={
|
15
|
+
"files": InputPort(
|
16
|
+
name="files",
|
17
|
+
port_type=PortType.FILE,
|
18
|
+
value=list(),
|
19
|
+
multiple=True,
|
20
|
+
),
|
21
|
+
"parse_quality": InputPort(
|
22
|
+
name="parse_quality",
|
23
|
+
port_type=PortType.SELECT,
|
24
|
+
value="default",
|
25
|
+
options=[
|
26
|
+
{"value": "default", "label": "default"},
|
27
|
+
{"value": "high", "label": "high"},
|
28
|
+
],
|
29
|
+
),
|
30
|
+
"remove_image": InputPort(
|
31
|
+
name="remove_image",
|
32
|
+
port_type=PortType.CHECKBOX,
|
33
|
+
value=True,
|
34
|
+
condition="return fieldsData.parse_quality.value === 'default'",
|
35
|
+
),
|
36
|
+
"remove_url_and_email": InputPort(
|
37
|
+
name="remove_url_and_email",
|
38
|
+
port_type=PortType.CHECKBOX,
|
39
|
+
value=True,
|
40
|
+
condition="return fieldsData.parse_quality.value === 'default'",
|
41
|
+
),
|
42
|
+
"parse_table": InputPort(
|
43
|
+
name="parse_table",
|
44
|
+
port_type=PortType.CHECKBOX,
|
45
|
+
value=True,
|
46
|
+
condition="return fieldsData.parse_quality.value === 'high'",
|
47
|
+
),
|
48
|
+
"parse_formula": InputPort(
|
49
|
+
name="parse_formula",
|
50
|
+
port_type=PortType.CHECKBOX,
|
51
|
+
value=False,
|
52
|
+
condition="return fieldsData.parse_quality.value === 'high'",
|
53
|
+
),
|
54
|
+
"multiple": InputPort(
|
55
|
+
name="multiple",
|
56
|
+
port_type=PortType.CHECKBOX,
|
57
|
+
value=True,
|
58
|
+
),
|
59
|
+
"output": OutputPort(),
|
60
|
+
},
|
61
|
+
)
|
62
|
+
|
63
|
+
|
64
|
+
class FileUpload(Node):
|
65
|
+
def __init__(self, id: Optional[str] = None):
|
66
|
+
super().__init__(
|
67
|
+
node_type="FileUpload",
|
68
|
+
category="file_processing",
|
69
|
+
task_name="file_processing.file_upload",
|
70
|
+
node_id=id,
|
71
|
+
ports={
|
72
|
+
"files": InputPort(
|
73
|
+
name="files",
|
74
|
+
port_type=PortType.FILE,
|
75
|
+
value=list(),
|
76
|
+
support_file_types=["*/*"],
|
77
|
+
multiple=True,
|
78
|
+
),
|
79
|
+
"unzip_files": InputPort(
|
80
|
+
name="unzip_files",
|
81
|
+
port_type=PortType.CHECKBOX,
|
82
|
+
value=False,
|
83
|
+
),
|
84
|
+
"unzip_output_format": InputPort(
|
85
|
+
name="unzip_output_format",
|
86
|
+
port_type=PortType.SELECT,
|
87
|
+
value="list",
|
88
|
+
options=[
|
89
|
+
{"value": "list", "label": "list"},
|
90
|
+
{"value": "dict", "label": "dict"},
|
91
|
+
],
|
92
|
+
condition="return fieldsData.unzip_files.value",
|
93
|
+
),
|
94
|
+
"allowed_file_types": InputPort(
|
95
|
+
name="allowed_file_types",
|
96
|
+
port_type=PortType.INPUT,
|
97
|
+
value="*/*",
|
98
|
+
),
|
99
|
+
"multiple": InputPort(
|
100
|
+
name="multiple",
|
101
|
+
port_type=PortType.CHECKBOX,
|
102
|
+
value=True,
|
103
|
+
),
|
104
|
+
"output": OutputPort(),
|
105
|
+
},
|
106
|
+
)
|