vectorvein 0.2.65__py3-none-any.whl → 0.2.67__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.
@@ -86,6 +86,16 @@ def generate_python_code(
86
86
  node_imports = set()
87
87
  node_instances = {}
88
88
 
89
+ # 收集所有连接的端口
90
+ connected_ports = set()
91
+ for edge in workflow_data["edges"]:
92
+ source_id = edge["source"]
93
+ target_id = edge["target"]
94
+ source_handle = edge["sourceHandle"]
95
+ target_handle = edge["targetHandle"]
96
+ connected_ports.add((source_id, source_handle))
97
+ connected_ports.add((target_id, target_handle))
98
+
89
99
  # 解析节点并生成导入语句
90
100
  for node in workflow_data["nodes"]:
91
101
  node_type = node["type"]
@@ -125,7 +135,13 @@ def generate_python_code(
125
135
  port_value = port["value"]
126
136
  default_value = node_instance.ports[port_name].value if port_name in node_instance.ports else None
127
137
 
128
- if port_value and port_value != default_value:
138
+ # 判断端口是否有值且值与默认不同,并且端口满足以下条件之一:有连接、是输入端口、在UI上显示
139
+ port_is_connected = (node["id"], port["name"]) in connected_ports
140
+ if (
141
+ port_value
142
+ and port_value != default_value
143
+ and (port_is_connected or not port.get("is_output", False) or port.get("show", False))
144
+ ):
129
145
  values.append(port)
130
146
 
131
147
  node_instances[node["id"]] = {
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: vectorvein
3
- Version: 0.2.65
3
+ Version: 0.2.67
4
4
  Summary: VectorVein Python SDK
5
5
  Author-Email: Anderson <andersonby@163.com>
6
6
  License: MIT
@@ -22,10 +22,10 @@ Requires-Dist: redis; extra == "redis"
22
22
  Provides-Extra: diskcache
23
23
  Requires-Dist: diskcache; extra == "diskcache"
24
24
  Provides-Extra: vertex
25
- Requires-Dist: anthropic[vertex]; extra == "vertex"
26
25
  Requires-Dist: google-auth>=2.35.0; extra == "vertex"
27
26
  Provides-Extra: bedrock
28
- Requires-Dist: anthropic[bedrock]; extra == "bedrock"
27
+ Requires-Dist: boto3>=1.28.57; extra == "bedrock"
28
+ Requires-Dist: botocore>=1.31.57; extra == "bedrock"
29
29
  Description-Content-Type: text/markdown
30
30
 
31
31
  # 向量脉络 API 包
@@ -1,6 +1,6 @@
1
- vectorvein-0.2.65.dist-info/METADATA,sha256=uzmiNET17QtrxVT2HdpBs68JBFwNXkDdfIQ_0HG8-b4,4570
2
- vectorvein-0.2.65.dist-info/WHEEL,sha256=thaaA2w1JzcGC48WYufAs8nrYZjJm8LqNfnXFOFyCC4,90
3
- vectorvein-0.2.65.dist-info/entry_points.txt,sha256=6OYgBcLyFCUgeqLgnvMyOJxPCWzgy7se4rLPKtNonMs,34
1
+ vectorvein-0.2.67.dist-info/METADATA,sha256=qWWjTXDYBxtywqJT-x7olVtPDI3rkFcW1CdwtMWBUoc,4567
2
+ vectorvein-0.2.67.dist-info/WHEEL,sha256=thaaA2w1JzcGC48WYufAs8nrYZjJm8LqNfnXFOFyCC4,90
3
+ vectorvein-0.2.67.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
@@ -62,6 +62,6 @@ vectorvein/workflow/nodes/vector_db.py,sha256=p9AT_E8ASbcYHZqHYTCIGvqkIqzxaFM4Ux
62
62
  vectorvein/workflow/nodes/video_generation.py,sha256=qmdg-t_idpxq1veukd-jv_ChICMOoInKxprV9Z4Vi2w,4118
63
63
  vectorvein/workflow/nodes/web_crawlers.py,sha256=FB0bTimkk___p3Z5UwQx2YarJyQCc45jjnbXbgGA_qw,5640
64
64
  vectorvein/workflow/utils/check.py,sha256=Oj_S5WQf4_Fr_ro3ipjZt9unKFSFcuwZrrSmrS9kVLE,10193
65
- vectorvein/workflow/utils/json_to_code.py,sha256=eeOxtlAUWeEgUyFVawDjee3nIhonnROUUanyf1-l9Ro,6354
65
+ vectorvein/workflow/utils/json_to_code.py,sha256=ozdENkT1fYO67XdZX3Una5_jhGEUJdwD0DfZh0x4q3w,7120
66
66
  vectorvein/workflow/utils/layout.py,sha256=j0bRD3uaXu40xCS6U6BGahBI8FrHa5MiF55GbTrZ1LM,4565
67
- vectorvein-0.2.65.dist-info/RECORD,,
67
+ vectorvein-0.2.67.dist-info/RECORD,,