vectorvein 0.1.86__py3-none-any.whl → 0.1.88__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 +12 -12
- vectorvein/workflow/graph/port.py +13 -2
- {vectorvein-0.1.86.dist-info → vectorvein-0.1.88.dist-info}/METADATA +1 -1
- {vectorvein-0.1.86.dist-info → vectorvein-0.1.88.dist-info}/RECORD +6 -6
- {vectorvein-0.1.86.dist-info → vectorvein-0.1.88.dist-info}/WHEEL +0 -0
- {vectorvein-0.1.86.dist-info → vectorvein-0.1.88.dist-info}/entry_points.txt +0 -0
@@ -282,9 +282,9 @@ class OpenAICompatibleChatClient(BaseChatClient):
|
|
282
282
|
buffer = ""
|
283
283
|
break
|
284
284
|
|
285
|
-
message["content"] = "".join(current_content)
|
285
|
+
message["content"] = "".join(current_content)
|
286
286
|
if current_reasoning:
|
287
|
-
message["reasoning_content"] = "".join(current_reasoning)
|
287
|
+
message["reasoning_content"] = "".join(current_reasoning)
|
288
288
|
current_content.clear()
|
289
289
|
current_reasoning.clear()
|
290
290
|
|
@@ -307,8 +307,8 @@ class OpenAICompatibleChatClient(BaseChatClient):
|
|
307
307
|
else:
|
308
308
|
current_content.append(buffer)
|
309
309
|
final_message = {
|
310
|
-
"content": "".join(current_content)
|
311
|
-
"reasoning_content": "".join(current_reasoning)
|
310
|
+
"content": "".join(current_content),
|
311
|
+
"reasoning_content": "".join(current_reasoning) if current_reasoning else None,
|
312
312
|
}
|
313
313
|
yield ChatCompletionDeltaMessage(**final_message, usage=usage)
|
314
314
|
|
@@ -338,8 +338,8 @@ class OpenAICompatibleChatClient(BaseChatClient):
|
|
338
338
|
if not result["reasoning_content"] and result["content"]:
|
339
339
|
think_match = re.search(r"<think>(.*?)</think>", result["content"], re.DOTALL)
|
340
340
|
if think_match:
|
341
|
-
result["reasoning_content"] = think_match.group(1)
|
342
|
-
result["content"] = result["content"].replace(think_match.group(0), "", 1)
|
341
|
+
result["reasoning_content"] = think_match.group(1)
|
342
|
+
result["content"] = result["content"].replace(think_match.group(0), "", 1)
|
343
343
|
|
344
344
|
if tools:
|
345
345
|
if self.model_setting.function_call_available and response.choices[0].message.tool_calls:
|
@@ -608,9 +608,9 @@ class AsyncOpenAICompatibleChatClient(BaseAsyncChatClient):
|
|
608
608
|
buffer = ""
|
609
609
|
break
|
610
610
|
|
611
|
-
message["content"] = "".join(current_content)
|
611
|
+
message["content"] = "".join(current_content)
|
612
612
|
if current_reasoning:
|
613
|
-
message["reasoning_content"] = "".join(current_reasoning)
|
613
|
+
message["reasoning_content"] = "".join(current_reasoning)
|
614
614
|
current_content.clear()
|
615
615
|
current_reasoning.clear()
|
616
616
|
|
@@ -633,8 +633,8 @@ class AsyncOpenAICompatibleChatClient(BaseAsyncChatClient):
|
|
633
633
|
else:
|
634
634
|
current_content.append(buffer)
|
635
635
|
final_message = {
|
636
|
-
"content": "".join(current_content)
|
637
|
-
"reasoning_content": "".join(current_reasoning)
|
636
|
+
"content": "".join(current_content),
|
637
|
+
"reasoning_content": "".join(current_reasoning) if current_reasoning else None,
|
638
638
|
}
|
639
639
|
yield ChatCompletionDeltaMessage(**final_message, usage=usage)
|
640
640
|
|
@@ -663,8 +663,8 @@ class AsyncOpenAICompatibleChatClient(BaseAsyncChatClient):
|
|
663
663
|
if not result["reasoning_content"] and result["content"]:
|
664
664
|
think_match = re.search(r"<think>(.*?)</think>", result["content"], re.DOTALL)
|
665
665
|
if think_match:
|
666
|
-
result["reasoning_content"] = think_match.group(1)
|
667
|
-
result["content"] = result["content"].replace(think_match.group(0), "", 1)
|
666
|
+
result["reasoning_content"] = think_match.group(1)
|
667
|
+
result["content"] = result["content"].replace(think_match.group(0), "", 1)
|
668
668
|
|
669
669
|
if tools:
|
670
670
|
if self.model_setting.function_call_available and response.choices[0].message.tool_calls:
|
@@ -43,7 +43,7 @@ class Port:
|
|
43
43
|
self.port_type = port_type
|
44
44
|
self.required = required
|
45
45
|
self.show = show
|
46
|
-
self.
|
46
|
+
self._value = value
|
47
47
|
self.options = options
|
48
48
|
self.field_type = field_type
|
49
49
|
self.is_output = is_output
|
@@ -66,7 +66,7 @@ class Port:
|
|
66
66
|
"field_type": self.port_type.value if isinstance(self.port_type, PortType) else self.port_type,
|
67
67
|
"required": self.required,
|
68
68
|
"show": self.show,
|
69
|
-
"value": self.
|
69
|
+
"value": self._value,
|
70
70
|
"options": self.options,
|
71
71
|
"type": self.field_type,
|
72
72
|
"is_output": self.is_output,
|
@@ -82,6 +82,17 @@ class Port:
|
|
82
82
|
"list": self.list,
|
83
83
|
}
|
84
84
|
|
85
|
+
@property
|
86
|
+
def value(self) -> Any:
|
87
|
+
return self._value
|
88
|
+
|
89
|
+
@value.setter
|
90
|
+
def value(self, value: Any) -> None:
|
91
|
+
if self.options:
|
92
|
+
if value not in map(lambda x: x["value"], self.options):
|
93
|
+
raise ValueError(f"Value `{value}` is not in Port `{self.name}` options {self.options}")
|
94
|
+
self._value = value
|
95
|
+
|
85
96
|
|
86
97
|
class InputPort(Port):
|
87
98
|
def __init__(
|
@@ -1,6 +1,6 @@
|
|
1
|
-
vectorvein-0.1.
|
2
|
-
vectorvein-0.1.
|
3
|
-
vectorvein-0.1.
|
1
|
+
vectorvein-0.1.88.dist-info/METADATA,sha256=KRIyAAdrbGxC8wyWqBNzmgXgWGYIO_JIquXlYDiYFZw,641
|
2
|
+
vectorvein-0.1.88.dist-info/WHEEL,sha256=thaaA2w1JzcGC48WYufAs8nrYZjJm8LqNfnXFOFyCC4,90
|
3
|
+
vectorvein-0.1.88.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=zX-O5YkoAkzb6DKyoZTJUS56PIwkxjwKtWybUkRtGXg,28798
|
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
|
@@ -35,7 +35,7 @@ vectorvein/utilities/media_processing.py,sha256=CTRq-lGlFkFgP_FSRhNwF_qUgmOrXPf2
|
|
35
35
|
vectorvein/utilities/retry.py,sha256=6KFS9R2HdhqM3_9jkjD4F36ZSpEx2YNFGOVlpOsUetM,2208
|
36
36
|
vectorvein/workflow/graph/edge.py,sha256=xLZEJmBjAfVB53cd7CuRcKhgE6QqXv9nz32wJn8cmyk,1064
|
37
37
|
vectorvein/workflow/graph/node.py,sha256=A3M_GghrSju1D3xc_HtPdGyr-7XSkplGPKJveOUiIF4,3256
|
38
|
-
vectorvein/workflow/graph/port.py,sha256=
|
38
|
+
vectorvein/workflow/graph/port.py,sha256=Q6HmI2cUi6viJ98ec6-MmMPMRtKS1-OgaudP3LMwVLA,6054
|
39
39
|
vectorvein/workflow/graph/workflow.py,sha256=uh8JzTbvaucKryvFUj3nAswtdOtaOw2Z4YfD9Q6r77s,3973
|
40
40
|
vectorvein/workflow/nodes/__init__.py,sha256=jd4O27kIJdOtkij1FYZ6aJnJy2OQa7xtL1r-Yv8ylO0,3103
|
41
41
|
vectorvein/workflow/nodes/audio_generation.py,sha256=ht2S0vnd0mIAt6FBaSWlADGbb7f_1DAySYrgYnvZT1Q,5726
|
@@ -54,4 +54,4 @@ vectorvein/workflow/nodes/vector_db.py,sha256=t6I17q6iR3yQreiDHpRrksMdWDPIvgqJs0
|
|
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
56
|
vectorvein/workflow/utils/json_to_code.py,sha256=F7dhDy8kGc8ndOeihGLRLGFGlquoxVlb02ENtxnQ0C8,5914
|
57
|
-
vectorvein-0.1.
|
57
|
+
vectorvein-0.1.88.dist-info/RECORD,,
|
File without changes
|
File without changes
|