vectorvein 0.1.13__py3-none-any.whl → 0.1.14__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.
@@ -13,6 +13,7 @@ from .openai_client import OpenAIChatClient, AsyncOpenAIChatClient
13
13
  from .zhipuai_client import ZhiPuAIChatClient, AsyncZhiPuAIChatClient
14
14
  from .minimax_client import MiniMaxChatClient, AsyncMiniMaxChatClient
15
15
  from .mistral_client import MistralChatClient, AsyncMistralChatClient
16
+ from .baichuan_client import BaichuanChatClient, AsyncBaichuanChatClient
16
17
  from .moonshot_client import MoonshotChatClient, AsyncMoonshotChatClient
17
18
  from .deepseek_client import DeepSeekChatClient, AsyncDeepSeekChatClient
18
19
 
@@ -36,6 +37,7 @@ BackendMap = {
36
37
  BackendType.Qwen: QwenChatClient,
37
38
  BackendType.Yi: YiChatClient,
38
39
  BackendType.ZhiPuAI: ZhiPuAIChatClient,
40
+ BackendType.Baichuan: BaichuanChatClient,
39
41
  },
40
42
  "async": {
41
43
  BackendType.Anthropic: AsyncAnthropicChatClient,
@@ -50,6 +52,7 @@ BackendMap = {
50
52
  BackendType.Qwen: AsyncQwenChatClient,
51
53
  BackendType.Yi: AsyncYiChatClient,
52
54
  BackendType.ZhiPuAI: AsyncZhiPuAIChatClient,
55
+ BackendType.Baichuan: AsyncBaichuanChatClient,
53
56
  },
54
57
  }
55
58
 
@@ -0,0 +1,15 @@
1
+ # @Author: Bi Ying
2
+ # @Date: 2024-07-26 14:48:55
3
+ from ..types.enums import BackendType
4
+ from ..types.defaults import BAICHUAN_DEFAULT_MODEL
5
+ from .openai_compatible_client import OpenAICompatibleChatClient, AsyncOpenAICompatibleChatClient
6
+
7
+
8
+ class BaichuanChatClient(OpenAICompatibleChatClient):
9
+ DEFAULT_MODEL = BAICHUAN_DEFAULT_MODEL
10
+ BACKEND_NAME = BackendType.Baichuan
11
+
12
+
13
+ class AsyncBaichuanChatClient(AsyncOpenAICompatibleChatClient):
14
+ DEFAULT_MODEL = BAICHUAN_DEFAULT_MODEL
15
+ BACKEND_NAME = BackendType.Baichuan
@@ -26,6 +26,7 @@ class Settings(BaseModel):
26
26
  qwen: BackendSettings = Field(default_factory=BackendSettings, description="Qwen models settings.")
27
27
  yi: BackendSettings = Field(default_factory=BackendSettings, description="Yi models settings.")
28
28
  zhipuai: BackendSettings = Field(default_factory=BackendSettings, description="Zhipuai models settings.")
29
+ baichuan: BackendSettings = Field(default_factory=BackendSettings, description="Baichuan models settings.")
29
30
 
30
31
  def __init__(self, **data):
31
32
  model_types = {
@@ -41,6 +42,7 @@ class Settings(BaseModel):
41
42
  "qwen": defs.QWEN_MODELS,
42
43
  "yi": defs.YI_MODELS,
43
44
  "zhipuai": defs.ZHIPUAI_MODELS,
45
+ "baichuan": defs.BAICHUAN_MODELS,
44
46
  }
45
47
 
46
48
  for model_type, default_models in model_types.items():
@@ -52,6 +52,46 @@ DEEPSEEK_MODELS = {
52
52
  }
53
53
  DEEPSEEK_DEFAULT_MODEL = "deepseek-chat"
54
54
 
55
+ # Baichuan models
56
+ BAICHUAN_MODELS = {
57
+ "Baichuan4": {
58
+ "id": "Baichuan4",
59
+ "context_length": 32768,
60
+ "max_output_tokens": 2048,
61
+ "function_call_available": True,
62
+ "response_format_available": True,
63
+ },
64
+ "Baichuan3-Turbo": {
65
+ "id": "Baichuan3-Turbo",
66
+ "context_length": 32768,
67
+ "max_output_tokens": 2048,
68
+ "function_call_available": True,
69
+ "response_format_available": True,
70
+ },
71
+ "Baichuan3-Turbo-128k": {
72
+ "id": "Baichuan3-Turbo-128k",
73
+ "context_length": 128000,
74
+ "max_output_tokens": 2048,
75
+ "function_call_available": True,
76
+ "response_format_available": True,
77
+ },
78
+ "Baichuan2-Turbo": {
79
+ "id": "Baichuan2-Turbo",
80
+ "context_length": 32768,
81
+ "max_output_tokens": 2048,
82
+ "function_call_available": True,
83
+ "response_format_available": False,
84
+ },
85
+ "Baichuan2-53B": {
86
+ "id": "Baichuan2-53B",
87
+ "context_length": 32768,
88
+ "max_output_tokens": 2048,
89
+ "function_call_available": False,
90
+ "response_format_available": False,
91
+ },
92
+ }
93
+ BAICHUAN_DEFAULT_MODEL = "Baichuan3-Turbo"
94
+
55
95
  # Groq models
56
96
  GROQ_DEFAULT_MODEL = "llama3-70b-8192"
57
97
  GROQ_MODELS = {
vectorvein/types/enums.py CHANGED
@@ -44,6 +44,9 @@ class BackendType(str, Enum):
44
44
  # Gemini
45
45
  Gemini = "gemini"
46
46
 
47
+ # Baichuan
48
+ Baichuan = "baichuan"
49
+
47
50
  def __repr__(self):
48
51
  """Get a string representation."""
49
52
  return f'"{self.value}"'
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: vectorvein
3
- Version: 0.1.13
3
+ Version: 0.1.14
4
4
  Summary: Default template for PDM package
5
5
  Author-Email: Anderson <andersonby@163.com>
6
6
  License: MIT
@@ -1,8 +1,9 @@
1
- vectorvein-0.1.13.dist-info/METADATA,sha256=suWdvirK0pih0zkQrJ0zUkXQ7hhFr8f0NmUHD6yQwT8,502
2
- vectorvein-0.1.13.dist-info/WHEEL,sha256=rSwsxJWe3vzyR5HCwjWXQruDgschpei4h_giTm0dJVE,90
1
+ vectorvein-0.1.14.dist-info/METADATA,sha256=Xm4rgWhrckl6Jik4gaGQDx6KC85l4lDFcy2UToEj5no,502
2
+ vectorvein-0.1.14.dist-info/WHEEL,sha256=rSwsxJWe3vzyR5HCwjWXQruDgschpei4h_giTm0dJVE,90
3
3
  vectorvein/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
- vectorvein/chat_clients/__init__.py,sha256=rur7elYPL-HIQM46U5Kb8aO4tMXfYOOKLdIHFlKIw0M,4421
4
+ vectorvein/chat_clients/__init__.py,sha256=oaEcDx5MM89oBOqmvWWDGAkMoaHihh892cA0tJU2u4g,4599
5
5
  vectorvein/chat_clients/anthropic_client.py,sha256=sECXynbReJs1xixFEHSlfEQo9Q1zGf5uCJ-V8emdoAM,20438
6
+ vectorvein/chat_clients/baichuan_client.py,sha256=CVMvpgjdrZGv0BWnTOBD-f2ufZ3wq3496wqukumsAr4,526
6
7
  vectorvein/chat_clients/base_client.py,sha256=4nGY5A7s7Ubgqb7XqFGkYwM6RNYDTuWkHZrH5KTJZiE,4585
7
8
  vectorvein/chat_clients/deepseek_client.py,sha256=3qWu01NlJAP2N-Ff62d5-CZXZitlizE1fzb20LNetig,526
8
9
  vectorvein/chat_clients/gemini_client.py,sha256=W-9Vu-GTE9wxStPznyNR0rBEgDG3LYBu2uQXd4sh1YQ,14425
@@ -17,10 +18,10 @@ vectorvein/chat_clients/qwen_client.py,sha256=-ryh-m9PgsO0fc4ulcCmPTy1155J8YUy15
17
18
  vectorvein/chat_clients/utils.py,sha256=mnAew2Ie3nQHdEyDLKuJvXkQ5QdcSAJ6SpYk5JPbR1Q,20888
18
19
  vectorvein/chat_clients/yi_client.py,sha256=RNf4CRuPJfixrwLZ3-DEc3t25QDe1mvZeb9sku2f8Bc,484
19
20
  vectorvein/chat_clients/zhipuai_client.py,sha256=Ys5DSeLCuedaDXr3PfG1EW2zKXopt-awO2IylWSwY0s,519
20
- vectorvein/settings/__init__.py,sha256=4mpccT7eZC3yI1vVnVViW4wHBnDEH9D2R5EsIP34VgU,3218
21
- vectorvein/types/defaults.py,sha256=lCzGOLybX8FzHX-Cv32BaQFZ8sHvPhGIIwDD-VksP20,13460
22
- vectorvein/types/enums.py,sha256=vzOenCnRlFXBwPh-lfFhjGfM-6yfDj7wZColHODqocI,1550
21
+ vectorvein/settings/__init__.py,sha256=jVHbhHn1BuMcyfZGXrxWKiI4NdY9wzvYyGMvKYmUtqg,3378
22
+ vectorvein/types/defaults.py,sha256=bwE-MLIuiDqMiOGsstacaUTGD-bN5pKL6lGP-gS-Kmg,14667
23
+ vectorvein/types/enums.py,sha256=PNK_pTIyjJFy-yAG2PHaMIO1ey3W6fReMCkH8M8VRW4,1595
23
24
  vectorvein/types/llm_parameters.py,sha256=PWN18dDGrCTP4Bz7pX0XxO-wDUA7qTngppzEELrROmc,3496
24
25
  vectorvein/utilities/media_processing.py,sha256=BujciRmw1GMmc3ELRvafL8STcy6r5b2rVnh27-uA7so,2256
25
26
  vectorvein/utilities/retry.py,sha256=9ePuJdeUUGx-qMWfaFxmlOvG_lQPwCQ4UB1z3Edlo34,993
26
- vectorvein-0.1.13.dist-info/RECORD,,
27
+ vectorvein-0.1.14.dist-info/RECORD,,