vectorvein 0.1.80__py3-none-any.whl → 0.1.81__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/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.81.dist-info}/METADATA +1 -1
- {vectorvein-0.1.80.dist-info → vectorvein-0.1.81.dist-info}/RECORD +25 -4
- {vectorvein-0.1.80.dist-info → vectorvein-0.1.81.dist-info}/WHEEL +0 -0
- {vectorvein-0.1.80.dist-info → vectorvein-0.1.81.dist-info}/entry_points.txt +0 -0
@@ -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
|
+
)
|