vectorvein 0.2.37__py3-none-any.whl → 0.2.39__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.
@@ -59,6 +59,17 @@ class Port:
59
59
  self.max_count = max_count
60
60
  self.list = list
61
61
 
62
+ @property
63
+ def python_type(self):
64
+ if self.port_type == PortType.CHECKBOX or self.port_type == "checkbox":
65
+ return "bool"
66
+ elif self.port_type == PortType.NUMBER or self.port_type == "number":
67
+ return "float"
68
+ elif self.port_type == PortType.TEMPERATURE or self.port_type == "temperature":
69
+ return "float"
70
+ else:
71
+ return "str"
72
+
62
73
  def to_dict(self) -> Dict[str, Any]:
63
74
  return {
64
75
  "name": self.name,
@@ -68,7 +79,7 @@ class Port:
68
79
  "show": self.show,
69
80
  "value": self._value,
70
81
  "options": self.options,
71
- "type": self.field_type,
82
+ "type": self.field_type or self.python_type,
72
83
  "is_output": self.is_output,
73
84
  # "condition": f"(fieldsData) => {{ {self.condition} }}" if self.condition else "",
74
85
  "max_length": self.max_length,
@@ -52,6 +52,7 @@ from .tools import CodebaseAnalysis, TextTranslation, TextSearch, ProgrammingFun
52
52
  from .vector_db import AddData, DeleteData, Search
53
53
  from .video_generation import KlingVideo, CogVideoX
54
54
  from .web_crawlers import TextCrawler, BilibiliCrawler, DouyinCrawler, YoutubeCrawler
55
+ from .triggers import ButtonTrigger
55
56
 
56
57
 
57
58
  __all__ = [
@@ -137,4 +138,5 @@ __all__ = [
137
138
  "WorkflowInvoke",
138
139
  "XAi",
139
140
  "YoutubeCrawler",
141
+ "ButtonTrigger",
140
142
  ]
@@ -0,0 +1,21 @@
1
+ from typing import Optional
2
+
3
+ from ..graph.node import Node
4
+ from ..graph.port import PortType, InputPort
5
+
6
+
7
+ class ButtonTrigger(Node):
8
+ def __init__(self, id: Optional[str] = None):
9
+ super().__init__(
10
+ node_type="ButtonTrigger",
11
+ category="triggers",
12
+ task_name="triggers.button_trigger",
13
+ node_id=id,
14
+ ports={
15
+ "button_text": InputPort(
16
+ name="button_text",
17
+ port_type=PortType.INPUT,
18
+ value="",
19
+ ),
20
+ },
21
+ )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: vectorvein
3
- Version: 0.2.37
3
+ Version: 0.2.39
4
4
  Summary: VectorVein Python SDK
5
5
  Author-Email: Anderson <andersonby@163.com>
6
6
  License: MIT
@@ -1,6 +1,6 @@
1
- vectorvein-0.2.37.dist-info/METADATA,sha256=fJpDR72JlBhl26sqEpD_Ejvr6ukbHTXBPjUiMfH1PAQ,4570
2
- vectorvein-0.2.37.dist-info/WHEEL,sha256=thaaA2w1JzcGC48WYufAs8nrYZjJm8LqNfnXFOFyCC4,90
3
- vectorvein-0.2.37.dist-info/entry_points.txt,sha256=6OYgBcLyFCUgeqLgnvMyOJxPCWzgy7se4rLPKtNonMs,34
1
+ vectorvein-0.2.39.dist-info/METADATA,sha256=-PDS72SITnnru7I3ahdoPh9m_fdoEKVukfjV15ptYKs,4570
2
+ vectorvein-0.2.39.dist-info/WHEEL,sha256=thaaA2w1JzcGC48WYufAs8nrYZjJm8LqNfnXFOFyCC4,90
3
+ vectorvein-0.2.39.dist-info/entry_points.txt,sha256=6OYgBcLyFCUgeqLgnvMyOJxPCWzgy7se4rLPKtNonMs,34
4
4
  vectorvein/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
5
  vectorvein/api/__init__.py,sha256=lfY-XA46fgD2iIZTU0VYP8i07AwA03Egj4Qua0vUKrQ,738
6
6
  vectorvein/api/client.py,sha256=xF-leKDQzVyyy9FnIRaz0k4eElYW1XbbzeRLcpnyk90,33047
@@ -43,9 +43,9 @@ vectorvein/utilities/rate_limiter.py,sha256=dwolIUVw2wP83Odqpx0AAaE77de1GzxkYDGH
43
43
  vectorvein/utilities/retry.py,sha256=6KFS9R2HdhqM3_9jkjD4F36ZSpEx2YNFGOVlpOsUetM,2208
44
44
  vectorvein/workflow/graph/edge.py,sha256=1ckyyjCue_PLm7P1ItUfKOy6AKkemOpZ9m1WJ8UXIHQ,1072
45
45
  vectorvein/workflow/graph/node.py,sha256=U3LAq01wOaDANVUuYWc2BhIq-Pl2-33FirJZkkNL_wA,5329
46
- vectorvein/workflow/graph/port.py,sha256=Q6HmI2cUi6viJ98ec6-MmMPMRtKS1-OgaudP3LMwVLA,6054
46
+ vectorvein/workflow/graph/port.py,sha256=_QpHCBGAu657VhYAh0Wzjri3ZZ8-WYJp99J465mqmwo,6492
47
47
  vectorvein/workflow/graph/workflow.py,sha256=K-1-FMfHO49Ww3sHKDOr_sD8GH-i36ylS7qtyJ-Vivg,8617
48
- vectorvein/workflow/nodes/__init__.py,sha256=a1fsitA0mf1UlDOSEz6QjSGjiFsvsQcuDE-p2q9SlhM,3181
48
+ vectorvein/workflow/nodes/__init__.py,sha256=dWrWtL3q0Vsn-MLgJ7gNgLCrwZ5BrqjrN2QFPNeBMuc,3240
49
49
  vectorvein/workflow/nodes/audio_generation.py,sha256=ZRFZ_ycMTSJ2LKmekctagQdJYTl-3q4TNOIKETpS9AM,5870
50
50
  vectorvein/workflow/nodes/control_flows.py,sha256=l8CjFQlsGV3fNGM6SVzS1Kz361K1xDv1fGT7acuDXuU,6613
51
51
  vectorvein/workflow/nodes/file_processing.py,sha256=Rsjc8al0z-2KuweO0nIybWvceqxbqOPQyTs0-pgy5m4,3980
@@ -57,9 +57,9 @@ vectorvein/workflow/nodes/output.py,sha256=_UQxiddHtGv2rkjhUFE-KDgrjnh0AGJQJyq9-
57
57
  vectorvein/workflow/nodes/relational_db.py,sha256=zfzUhV25TpZGhkIzO18PmAT5xhcsJC4AXKy0zyA05w8,5408
58
58
  vectorvein/workflow/nodes/text_processing.py,sha256=MRo_-oaC65hbzMxm7TYoeiS3rgvqh9y_Rny5RCfoATE,8342
59
59
  vectorvein/workflow/nodes/tools.py,sha256=n3gF7r5FqNz4Xg0nXYo5kl4ai_g4tWSRHqfnGrKJAls,13850
60
- vectorvein/workflow/nodes/triggers.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
60
+ vectorvein/workflow/nodes/triggers.py,sha256=BolH4X6S8HSuU2kwHmYKr-ozHbgKBmdZRcnXpK5EfGA,597
61
61
  vectorvein/workflow/nodes/vector_db.py,sha256=t6I17q6iR3yQreiDHpRrksMdWDPIvgqJs076z-7dlQQ,5712
62
62
  vectorvein/workflow/nodes/video_generation.py,sha256=qmdg-t_idpxq1veukd-jv_ChICMOoInKxprV9Z4Vi2w,4118
63
63
  vectorvein/workflow/nodes/web_crawlers.py,sha256=BhJBX1AZH7-22Gu95Ox4qJqmH5DU-m4dbUb5N5DTA-M,5559
64
64
  vectorvein/workflow/utils/json_to_code.py,sha256=F7dhDy8kGc8ndOeihGLRLGFGlquoxVlb02ENtxnQ0C8,5914
65
- vectorvein-0.2.37.dist-info/RECORD,,
65
+ vectorvein-0.2.39.dist-info/RECORD,,