vectorvein 0.1.82__py3-none-any.whl → 0.1.84__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 +2 -2
- vectorvein/workflow/nodes/__init__.py +4 -4
- vectorvein/workflow/nodes/llms.py +88 -0
- vectorvein/workflow/nodes/vector_db.py +4 -4
- vectorvein/workflow/utils/json_to_code.py +3 -9
- {vectorvein-0.1.82.dist-info → vectorvein-0.1.84.dist-info}/METADATA +1 -1
- {vectorvein-0.1.82.dist-info → vectorvein-0.1.84.dist-info}/RECORD +9 -9
- {vectorvein-0.1.82.dist-info → vectorvein-0.1.84.dist-info}/WHEEL +0 -0
- {vectorvein-0.1.82.dist-info → vectorvein-0.1.84.dist-info}/entry_points.txt +0 -0
@@ -258,7 +258,7 @@ class OpenAICompatibleChatClient(BaseChatClient):
|
|
258
258
|
else:
|
259
259
|
message = chunk.choices[0].delta.model_dump()
|
260
260
|
delta_content = message.get("content", "")
|
261
|
-
buffer += delta_content
|
261
|
+
buffer += delta_content or ""
|
262
262
|
|
263
263
|
while True:
|
264
264
|
if not in_reasoning:
|
@@ -584,7 +584,7 @@ class AsyncOpenAICompatibleChatClient(BaseAsyncChatClient):
|
|
584
584
|
else:
|
585
585
|
message = chunk.choices[0].delta.model_dump()
|
586
586
|
delta_content = message.get("content", "")
|
587
|
-
buffer += delta_content
|
587
|
+
buffer += delta_content or ""
|
588
588
|
|
589
589
|
while True:
|
590
590
|
if not in_reasoning:
|
@@ -47,7 +47,7 @@ from .text_processing import (
|
|
47
47
|
TemplateCompose,
|
48
48
|
)
|
49
49
|
from .tools import CodebaseAnalysis, TextTranslation, TextSearch, ProgrammingFunction, ImageSearch, WorkflowInvoke
|
50
|
-
from .vector_db import
|
50
|
+
from .vector_db import AddData, DeleteData, Search
|
51
51
|
from .video_generation import KlingVideo, CogVideoX
|
52
52
|
from .web_crawlers import TextCrawler, BilibiliCrawler, DouyinCrawler, YoutubeCrawler
|
53
53
|
|
@@ -125,9 +125,9 @@ __all__ = [
|
|
125
125
|
"TextTranslation",
|
126
126
|
"TextTruncation",
|
127
127
|
"Tts",
|
128
|
-
"
|
129
|
-
"
|
130
|
-
"
|
128
|
+
"AddData",
|
129
|
+
"DeleteData",
|
130
|
+
"Search",
|
131
131
|
"VideoEditing",
|
132
132
|
"VideoScreenshot",
|
133
133
|
"WorkflowInvoke",
|
@@ -65,6 +65,94 @@ class AliyunQwen(Node):
|
|
65
65
|
)
|
66
66
|
|
67
67
|
|
68
|
+
class Baichuan(Node):
|
69
|
+
def __init__(self, id: Optional[str] = None):
|
70
|
+
super().__init__(
|
71
|
+
node_type="Baichuan",
|
72
|
+
category="llms",
|
73
|
+
task_name="llms.baichuan",
|
74
|
+
node_id=id,
|
75
|
+
ports={
|
76
|
+
"prompt": InputPort(
|
77
|
+
name="prompt",
|
78
|
+
port_type=PortType.TEXTAREA,
|
79
|
+
value="",
|
80
|
+
),
|
81
|
+
"llm_model": InputPort(
|
82
|
+
name="llm_model",
|
83
|
+
port_type=PortType.SELECT,
|
84
|
+
value="Baichuan3-Turbo",
|
85
|
+
options=[
|
86
|
+
{"value": "Baichuan4", "label": "Baichuan4"},
|
87
|
+
{"value": "Baichuan3-Turbo", "label": "Baichuan3-Turbo"},
|
88
|
+
{"value": "Baichuan3-Turbo-128k", "label": "Baichuan3-Turbo-128k"},
|
89
|
+
{"value": "Baichuan2-Turbo", "label": "Baichuan2-Turbo"},
|
90
|
+
{"value": "Baichuan2-53B", "label": "Baichuan2-53B"},
|
91
|
+
],
|
92
|
+
),
|
93
|
+
"temperature": InputPort(
|
94
|
+
name="temperature",
|
95
|
+
port_type=PortType.TEMPERATURE,
|
96
|
+
value=0.7,
|
97
|
+
),
|
98
|
+
"top_p": InputPort(
|
99
|
+
name="top_p",
|
100
|
+
port_type=PortType.NUMBER,
|
101
|
+
value=0.95,
|
102
|
+
),
|
103
|
+
"stream": InputPort(
|
104
|
+
name="stream",
|
105
|
+
port_type=PortType.CHECKBOX,
|
106
|
+
value=False,
|
107
|
+
),
|
108
|
+
"system_prompt": InputPort(
|
109
|
+
name="system_prompt",
|
110
|
+
port_type=PortType.TEXTAREA,
|
111
|
+
value="",
|
112
|
+
),
|
113
|
+
"response_format": InputPort(
|
114
|
+
name="response_format",
|
115
|
+
port_type=PortType.SELECT,
|
116
|
+
value="text",
|
117
|
+
options=[
|
118
|
+
{"value": "text", "label": "Text"},
|
119
|
+
{"value": "json_object", "label": "JSON"},
|
120
|
+
],
|
121
|
+
),
|
122
|
+
"use_function_call": InputPort(
|
123
|
+
name="use_function_call",
|
124
|
+
port_type=PortType.CHECKBOX,
|
125
|
+
value=False,
|
126
|
+
),
|
127
|
+
"functions": InputPort(
|
128
|
+
name="functions",
|
129
|
+
port_type=PortType.SELECT,
|
130
|
+
value=[],
|
131
|
+
),
|
132
|
+
"function_call_mode": InputPort(
|
133
|
+
name="function_call_mode",
|
134
|
+
port_type=PortType.SELECT,
|
135
|
+
value="auto",
|
136
|
+
options=[
|
137
|
+
{"value": "auto", "label": "auto"},
|
138
|
+
{"value": "none", "label": "none"},
|
139
|
+
],
|
140
|
+
),
|
141
|
+
"output": OutputPort(
|
142
|
+
name="output",
|
143
|
+
),
|
144
|
+
"function_call_output": OutputPort(
|
145
|
+
name="function_call_output",
|
146
|
+
condition="return fieldsData.use_function_call.value",
|
147
|
+
),
|
148
|
+
"function_call_arguments": OutputPort(
|
149
|
+
name="function_call_arguments",
|
150
|
+
condition="return fieldsData.use_function_call.value",
|
151
|
+
),
|
152
|
+
},
|
153
|
+
)
|
154
|
+
|
155
|
+
|
68
156
|
class BaiduWenxin(Node):
|
69
157
|
def __init__(self, id: Optional[str] = None):
|
70
158
|
super().__init__(
|
@@ -4,7 +4,7 @@ from ..graph.node import Node
|
|
4
4
|
from ..graph.port import PortType, InputPort, OutputPort
|
5
5
|
|
6
6
|
|
7
|
-
class
|
7
|
+
class AddData(Node):
|
8
8
|
def __init__(self, id: Optional[str] = None):
|
9
9
|
super().__init__(
|
10
10
|
node_type="AddData",
|
@@ -86,7 +86,7 @@ class VectorDbAddData(Node):
|
|
86
86
|
)
|
87
87
|
|
88
88
|
|
89
|
-
class
|
89
|
+
class DeleteData(Node):
|
90
90
|
def __init__(self, id: Optional[str] = None):
|
91
91
|
super().__init__(
|
92
92
|
node_type="DeleteData",
|
@@ -110,10 +110,10 @@ class VectorDbDeleteData(Node):
|
|
110
110
|
)
|
111
111
|
|
112
112
|
|
113
|
-
class
|
113
|
+
class Search(Node):
|
114
114
|
def __init__(self, id: Optional[str] = None):
|
115
115
|
super().__init__(
|
116
|
-
node_type="
|
116
|
+
node_type="Search",
|
117
117
|
category="vector_db",
|
118
118
|
task_name="vector_db.search_data",
|
119
119
|
node_id=id,
|
@@ -158,11 +158,11 @@ def generate_python_code(
|
|
158
158
|
f"port_type={to_python_str(port['field_type'])}",
|
159
159
|
f"value={to_python_str(port['value'])}",
|
160
160
|
]
|
161
|
-
if port
|
161
|
+
if port.get("show"):
|
162
162
|
params.append(f"show={port['show']}")
|
163
|
-
if port
|
163
|
+
if port.get("options"):
|
164
164
|
params.append(f"options={port['options']}")
|
165
|
-
if port
|
165
|
+
if port.get("is_output"):
|
166
166
|
params.append(f"is_output={bool(port['is_output'])}")
|
167
167
|
code.append(f"{info['var_name']}.add_port({', '.join(params)})")
|
168
168
|
|
@@ -183,9 +183,3 @@ def generate_python_code(
|
|
183
183
|
code.append(f'workflow.connect({source_var}, "{source_handle}", {target_var}, "{target_handle}")')
|
184
184
|
|
185
185
|
return "\n".join(code)
|
186
|
-
|
187
|
-
|
188
|
-
if __name__ == "__main__":
|
189
|
-
# 使用示例
|
190
|
-
code = generate_python_code(json_file="workflow.json")
|
191
|
-
print(code)
|
@@ -1,6 +1,6 @@
|
|
1
|
-
vectorvein-0.1.
|
2
|
-
vectorvein-0.1.
|
3
|
-
vectorvein-0.1.
|
1
|
+
vectorvein-0.1.84.dist-info/METADATA,sha256=VypGorXFaEc9vawL2I6d4AfNe0Q7GbNRgMI76-nSs-A,641
|
2
|
+
vectorvein-0.1.84.dist-info/WHEEL,sha256=thaaA2w1JzcGC48WYufAs8nrYZjJm8LqNfnXFOFyCC4,90
|
3
|
+
vectorvein-0.1.84.dist-info/entry_points.txt,sha256=6OYgBcLyFCUgeqLgnvMyOJxPCWzgy7se4rLPKtNonMs,34
|
4
4
|
vectorvein/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
5
5
|
vectorvein/chat_clients/__init__.py,sha256=omQuG4PRRPNflSAgtdU--rwsWG6vMpwMEyIGZyFVHVQ,18596
|
6
6
|
vectorvein/chat_clients/anthropic_client.py,sha256=PGIKldH4FnGrqozoY_FZ6LqhDHC-jY7NF5J1F1zT2Ok,38257
|
@@ -14,7 +14,7 @@ vectorvein/chat_clients/minimax_client.py,sha256=ooJU92UCACC4TVWKJ-uo8vqQ8qF3K14
|
|
14
14
|
vectorvein/chat_clients/mistral_client.py,sha256=1aKSylzBDaLYcFnaBIL4-sXSzWmXfBeON9Q0rq-ziWw,534
|
15
15
|
vectorvein/chat_clients/moonshot_client.py,sha256=gbu-6nGxx8uM_U2WlI4Wus881rFRotzHtMSoYOcruGU,526
|
16
16
|
vectorvein/chat_clients/openai_client.py,sha256=Nz6tV45pWcsOupxjnsRsGTicbQNJWIZyxuJoJ5DGMpg,527
|
17
|
-
vectorvein/chat_clients/openai_compatible_client.py,sha256=
|
17
|
+
vectorvein/chat_clients/openai_compatible_client.py,sha256=HqdECEcm0JzENjmqclwTXFlnoiguYLfAZ7Z8tqYIsNE,28894
|
18
18
|
vectorvein/chat_clients/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
19
19
|
vectorvein/chat_clients/qwen_client.py,sha256=-ryh-m9PgsO0fc4ulcCmPTy1155J8YUy15uPoJQOHA0,513
|
20
20
|
vectorvein/chat_clients/stepfun_client.py,sha256=zsD2W5ahmR4DD9cqQTXmJr3txrGuvxbRWhFlRdwNijI,519
|
@@ -37,12 +37,12 @@ vectorvein/workflow/graph/edge.py,sha256=xLZEJmBjAfVB53cd7CuRcKhgE6QqXv9nz32wJn8
|
|
37
37
|
vectorvein/workflow/graph/node.py,sha256=nxDq4pTFcsm2x9MmNmZxghhc-HduSLRwH3Ct2i8bZ3o,2871
|
38
38
|
vectorvein/workflow/graph/port.py,sha256=kv0YbAPqe9Hh9QPSoiB2PUTTWQT1xIdNeVD50OkWTzA,5684
|
39
39
|
vectorvein/workflow/graph/workflow.py,sha256=BmS351-WSeHQ02Kh0jOQpxJbNgZ-AHwW0mSQLXcKceU,2805
|
40
|
-
vectorvein/workflow/nodes/__init__.py,sha256=
|
40
|
+
vectorvein/workflow/nodes/__init__.py,sha256=jd4O27kIJdOtkij1FYZ6aJnJy2OQa7xtL1r-Yv8ylO0,3103
|
41
41
|
vectorvein/workflow/nodes/audio_generation.py,sha256=ht2S0vnd0mIAt6FBaSWlADGbb7f_1DAySYrgYnvZT1Q,5726
|
42
42
|
vectorvein/workflow/nodes/control_flows.py,sha256=Zc_uWuroYznLrU-BZCncyzvejC-zFl6EuN_VP8oq5mY,6573
|
43
43
|
vectorvein/workflow/nodes/file_processing.py,sha256=Rsjc8al0z-2KuweO0nIybWvceqxbqOPQyTs0-pgy5m4,3980
|
44
44
|
vectorvein/workflow/nodes/image_generation.py,sha256=fXOhLGodJ3OdKBPXO5a3rq4wN2GMJ0jwqKO_gJFdocU,32852
|
45
|
-
vectorvein/workflow/nodes/llms.py,sha256=
|
45
|
+
vectorvein/workflow/nodes/llms.py,sha256=lCq5MVv6k4sEbRfnImQVM1Zzzsyuud-1XuapezIjfQc,34557
|
46
46
|
vectorvein/workflow/nodes/media_editing.py,sha256=Od0X0SdcyRhcJckWpDM4WvgWEKxaIsgMXpMifN8Sc5M,29405
|
47
47
|
vectorvein/workflow/nodes/media_processing.py,sha256=t-azYDphXmLRdOyHDfXFTS1tsEOyKqKskDyD0y232j8,19043
|
48
48
|
vectorvein/workflow/nodes/output.py,sha256=_UQxiddHtGv2rkjhUFE-KDgrjnh0AGJQJyq9-4Aji5A,12567
|
@@ -50,8 +50,8 @@ vectorvein/workflow/nodes/relational_db.py,sha256=zfzUhV25TpZGhkIzO18PmAT5xhcsJC
|
|
50
50
|
vectorvein/workflow/nodes/text_processing.py,sha256=cfepHoy8JaFDqWLUzl6lmlDlKaH0vk1gWQSm7T0wmn8,7503
|
51
51
|
vectorvein/workflow/nodes/tools.py,sha256=Vw7yPdPqENqQ-MwbPcz5LQ-5036UGApCPX6ZspPOw40,12739
|
52
52
|
vectorvein/workflow/nodes/triggers.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
53
|
-
vectorvein/workflow/nodes/vector_db.py,sha256=
|
53
|
+
vectorvein/workflow/nodes/vector_db.py,sha256=t6I17q6iR3yQreiDHpRrksMdWDPIvgqJs076z-7dlQQ,5712
|
54
54
|
vectorvein/workflow/nodes/video_generation.py,sha256=qmdg-t_idpxq1veukd-jv_ChICMOoInKxprV9Z4Vi2w,4118
|
55
55
|
vectorvein/workflow/nodes/web_crawlers.py,sha256=LsqomfXfqrXfHJDO1cl0Ox48f4St7X_SL12DSbAMSOw,5415
|
56
|
-
vectorvein/workflow/utils/json_to_code.py,sha256=
|
57
|
-
vectorvein-0.1.
|
56
|
+
vectorvein/workflow/utils/json_to_code.py,sha256=TmeibZZQaKBNr0dcWXs8WS6c5AsgRseuMGJ9bOw5fyI,5903
|
57
|
+
vectorvein-0.1.84.dist-info/RECORD,,
|
File without changes
|
File without changes
|