vectorvein 0.2.31__py3-none-any.whl → 0.2.32__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.
@@ -595,7 +595,20 @@ def transform_from_openai_message(message: ChatCompletionMessageParam, backend:
595
595
  )
596
596
  return {"role": role, "content": formatted_content}
597
597
  else:
598
- return {"role": role, "content": content}
598
+ if tool_calls:
599
+ formatted_content = [{"type": "text", "text": content}]
600
+ for tool_call in tool_calls:
601
+ formatted_content.append(
602
+ {
603
+ "type": "tool_use",
604
+ "id": tool_call["id"],
605
+ "name": tool_call["function"]["name"],
606
+ "input": json.loads(tool_call["function"]["arguments"]),
607
+ }
608
+ )
609
+ return {"role": role, "content": formatted_content}
610
+ else:
611
+ return {"role": role, "content": content}
599
612
  else:
600
613
  return message # 对于其他后端,保持原样
601
614
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: vectorvein
3
- Version: 0.2.31
3
+ Version: 0.2.32
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.31.dist-info/METADATA,sha256=6bAhtke289AGWRwg2q8KMxxxgs78Mt8o2nfpO7444qk,4570
2
- vectorvein-0.2.31.dist-info/WHEEL,sha256=thaaA2w1JzcGC48WYufAs8nrYZjJm8LqNfnXFOFyCC4,90
3
- vectorvein-0.2.31.dist-info/entry_points.txt,sha256=6OYgBcLyFCUgeqLgnvMyOJxPCWzgy7se4rLPKtNonMs,34
1
+ vectorvein-0.2.32.dist-info/METADATA,sha256=rUc7F0pG4OynN2CDW7zRZ41ZvMZnMw5K_HX96MmlYLw,4570
2
+ vectorvein-0.2.32.dist-info/WHEEL,sha256=thaaA2w1JzcGC48WYufAs8nrYZjJm8LqNfnXFOFyCC4,90
3
+ vectorvein-0.2.32.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
@@ -23,7 +23,7 @@ vectorvein/chat_clients/openai_compatible_client.py,sha256=d6V6T_FvPxEuOhHoQC-NH
23
23
  vectorvein/chat_clients/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
24
24
  vectorvein/chat_clients/qwen_client.py,sha256=-ryh-m9PgsO0fc4ulcCmPTy1155J8YUy15uPoJQOHA0,513
25
25
  vectorvein/chat_clients/stepfun_client.py,sha256=zsD2W5ahmR4DD9cqQTXmJr3txrGuvxbRWhFlRdwNijI,519
26
- vectorvein/chat_clients/utils.py,sha256=g7lIzuTrZgm3Tq6skTRu8_xUpml8EfRFFMuFEKQm7Vc,26267
26
+ vectorvein/chat_clients/utils.py,sha256=GHmXHlmkb1sdxUIi8lWtuKtw9bYOjaGjZ-vZ6RCTNGM,26872
27
27
  vectorvein/chat_clients/xai_client.py,sha256=eLFJJrNRJ-ni3DpshODcr3S1EJQLbhVwxyO1E54LaqM,491
28
28
  vectorvein/chat_clients/yi_client.py,sha256=RNf4CRuPJfixrwLZ3-DEc3t25QDe1mvZeb9sku2f8Bc,484
29
29
  vectorvein/chat_clients/zhipuai_client.py,sha256=Ys5DSeLCuedaDXr3PfG1EW2zKXopt-awO2IylWSwY0s,519
@@ -62,4 +62,4 @@ vectorvein/workflow/nodes/vector_db.py,sha256=t6I17q6iR3yQreiDHpRrksMdWDPIvgqJs0
62
62
  vectorvein/workflow/nodes/video_generation.py,sha256=qmdg-t_idpxq1veukd-jv_ChICMOoInKxprV9Z4Vi2w,4118
63
63
  vectorvein/workflow/nodes/web_crawlers.py,sha256=LsqomfXfqrXfHJDO1cl0Ox48f4St7X_SL12DSbAMSOw,5415
64
64
  vectorvein/workflow/utils/json_to_code.py,sha256=F7dhDy8kGc8ndOeihGLRLGFGlquoxVlb02ENtxnQ0C8,5914
65
- vectorvein-0.2.31.dist-info/RECORD,,
65
+ vectorvein-0.2.32.dist-info/RECORD,,