vectorvein 0.1.2__py3-none-any.whl → 0.1.3__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/utils.py
CHANGED
@@ -220,7 +220,7 @@ def format_workflow_messages(message, content, backend):
|
|
220
220
|
formatted_messages = []
|
221
221
|
|
222
222
|
# 工具调用消息
|
223
|
-
if backend in (BackendType.OpenAI, BackendType.ZhiPuAI, BackendType.Mistral):
|
223
|
+
if backend in (BackendType.OpenAI, BackendType.ZhiPuAI, BackendType.Mistral, BackendType.Yi):
|
224
224
|
tool_call_message = {
|
225
225
|
"content": None,
|
226
226
|
"role": "assistant",
|
@@ -277,7 +277,7 @@ def format_workflow_messages(message, content, backend):
|
|
277
277
|
formatted_messages.append(tool_call_message)
|
278
278
|
|
279
279
|
# 工具调用结果消息
|
280
|
-
if backend in (BackendType.OpenAI, BackendType.ZhiPuAI, BackendType.Mistral):
|
280
|
+
if backend in (BackendType.OpenAI, BackendType.ZhiPuAI, BackendType.Mistral, BackendType.Yi):
|
281
281
|
tool_call_result_message = {
|
282
282
|
"role": "tool",
|
283
283
|
"tool_call_id": message["metadata"]["selected_workflow"]["tool_call_id"],
|
@@ -363,12 +363,14 @@ def format_openai_message(message, backend):
|
|
363
363
|
|
364
364
|
|
365
365
|
def format_messages(
|
366
|
-
messages: list,
|
366
|
+
messages: list,
|
367
|
+
backend: BackendType = BackendType.OpenAI,
|
368
|
+
native_multimodal: bool = False,
|
367
369
|
) -> list:
|
368
370
|
"""将 VectorVein 和 OpenAI 的 Message 序列化后的格式转换为不同模型支持的格式
|
369
371
|
|
370
372
|
Args:
|
371
|
-
messages (list): VectorVein
|
373
|
+
messages (list): VectorVein Or OpenAI messages list.
|
372
374
|
backend (str, optional): Messages format target backend. Defaults to BackendType.OpenAI.
|
373
375
|
native_multimodal (bool, optional): Use native multimodal ability. Defaults to False.
|
374
376
|
|
@@ -1,5 +1,5 @@
|
|
1
|
-
vectorvein-0.1.
|
2
|
-
vectorvein-0.1.
|
1
|
+
vectorvein-0.1.3.dist-info/METADATA,sha256=C0hbnXUDDO_cTFk7pWq3BBEV3bYZVB96KO1ZvQYn0ac,423
|
2
|
+
vectorvein-0.1.3.dist-info/WHEEL,sha256=rSwsxJWe3vzyR5HCwjWXQruDgschpei4h_giTm0dJVE,90
|
3
3
|
vectorvein/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
4
4
|
vectorvein/chat_clients/__init__.py,sha256=kjXCFj4tGvD-qpiurFdc6gJWJSaqClr08iWYY3GVdJQ,3974
|
5
5
|
vectorvein/chat_clients/anthropic_client.py,sha256=sH6tZHYeZ4WncHtALvbx7axmY8YFOn8JDJKgTgIpqbw,18025
|
@@ -14,7 +14,7 @@ vectorvein/chat_clients/moonshot_client.py,sha256=gbu-6nGxx8uM_U2WlI4Wus881rFRot
|
|
14
14
|
vectorvein/chat_clients/openai_client.py,sha256=Nz6tV45pWcsOupxjnsRsGTicbQNJWIZyxuJoJ5DGMpg,527
|
15
15
|
vectorvein/chat_clients/openai_compatible_client.py,sha256=wtFstRAbVuhxHLxpihaiAoJbDd5-h35yVnhurCMYZRM,11726
|
16
16
|
vectorvein/chat_clients/qwen_client.py,sha256=-ryh-m9PgsO0fc4ulcCmPTy1155J8YUy15uPoJQOHA0,513
|
17
|
-
vectorvein/chat_clients/utils.py,sha256=
|
17
|
+
vectorvein/chat_clients/utils.py,sha256=DGIh9RqRq61krLX4bLVlqUg7H7MmCyCzBdysRXvNcHY,17634
|
18
18
|
vectorvein/chat_clients/yi_client.py,sha256=RNf4CRuPJfixrwLZ3-DEc3t25QDe1mvZeb9sku2f8Bc,484
|
19
19
|
vectorvein/chat_clients/zhipuai_client.py,sha256=Ys5DSeLCuedaDXr3PfG1EW2zKXopt-awO2IylWSwY0s,519
|
20
20
|
vectorvein/settings/__init__.py,sha256=1__ILDpBh25S43d32knqLBe05tF4AQwT0ZALdBHw1OY,3396
|
@@ -22,4 +22,4 @@ vectorvein/types/defaults.py,sha256=Mg-Mj3_eBzKZn1N8x1V2GqyaYgLD13i-NdSYdQC28X4,
|
|
22
22
|
vectorvein/types/enums.py,sha256=vzOenCnRlFXBwPh-lfFhjGfM-6yfDj7wZColHODqocI,1550
|
23
23
|
vectorvein/types/llm_parameters.py,sha256=88CwRQ3oCY35nPlCCcLk9T3jofKqT876CexXiB7ExQ8,3101
|
24
24
|
vectorvein/utilities/media_processing.py,sha256=BujciRmw1GMmc3ELRvafL8STcy6r5b2rVnh27-uA7so,2256
|
25
|
-
vectorvein-0.1.
|
25
|
+
vectorvein-0.1.3.dist-info/RECORD,,
|
File without changes
|