vectorvein 0.1.13__py3-none-any.whl → 0.1.15__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/__init__.py +3 -0
- vectorvein/chat_clients/baichuan_client.py +15 -0
- vectorvein/settings/__init__.py +2 -0
- vectorvein/types/defaults.py +51 -0
- vectorvein/types/enums.py +3 -0
- vectorvein/types/llm_parameters.py +1 -0
- {vectorvein-0.1.13.dist-info → vectorvein-0.1.15.dist-info}/METADATA +1 -1
- {vectorvein-0.1.13.dist-info → vectorvein-0.1.15.dist-info}/RECORD +9 -8
- {vectorvein-0.1.13.dist-info → vectorvein-0.1.15.dist-info}/WHEEL +0 -0
@@ -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
|
vectorvein/settings/__init__.py
CHANGED
@@ -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():
|
vectorvein/types/defaults.py
CHANGED
@@ -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 = {
|
@@ -193,6 +233,7 @@ YI_MODELS = {
|
|
193
233
|
"max_output_tokens": 2000,
|
194
234
|
"function_call_available": False,
|
195
235
|
"response_format_available": False,
|
236
|
+
"native_multimodal": True,
|
196
237
|
},
|
197
238
|
}
|
198
239
|
|
@@ -261,6 +302,7 @@ ZHIPUAI_MODELS = {
|
|
261
302
|
"function_call_available": False,
|
262
303
|
"response_format_available": False,
|
263
304
|
"max_output_tokens": 1024,
|
305
|
+
"native_multimodal": True,
|
264
306
|
},
|
265
307
|
"glm-4v-plus": {
|
266
308
|
"id": "glm-4v-plus",
|
@@ -268,6 +310,7 @@ ZHIPUAI_MODELS = {
|
|
268
310
|
"function_call_available": False,
|
269
311
|
"response_format_available": False,
|
270
312
|
"max_output_tokens": 1024,
|
313
|
+
"native_multimodal": True,
|
271
314
|
},
|
272
315
|
}
|
273
316
|
|
@@ -354,6 +397,7 @@ OPENAI_MODELS = {
|
|
354
397
|
"max_output_tokens": 4096,
|
355
398
|
"function_call_available": True,
|
356
399
|
"response_format_available": True,
|
400
|
+
"native_multimodal": True,
|
357
401
|
},
|
358
402
|
"gpt-4o-mini": {
|
359
403
|
"id": "gpt-4o-mini",
|
@@ -361,6 +405,7 @@ OPENAI_MODELS = {
|
|
361
405
|
"max_output_tokens": 16384,
|
362
406
|
"function_call_available": True,
|
363
407
|
"response_format_available": True,
|
408
|
+
"native_multimodal": True,
|
364
409
|
},
|
365
410
|
"gpt-4v": {
|
366
411
|
"id": "gpt-4v",
|
@@ -380,12 +425,14 @@ ANTHROPIC_MODELS = {
|
|
380
425
|
"max_output_tokens": 4096,
|
381
426
|
"function_call_available": True,
|
382
427
|
"response_format_available": True,
|
428
|
+
"native_multimodal": True,
|
383
429
|
},
|
384
430
|
"claude-3-sonnet-20240229": {
|
385
431
|
"id": "claude-3-sonnet-20240229",
|
386
432
|
"context_length": 200000,
|
387
433
|
"max_output_tokens": 4096,
|
388
434
|
"function_call_available": True,
|
435
|
+
"native_multimodal": True,
|
389
436
|
"response_format_available": True,
|
390
437
|
},
|
391
438
|
"claude-3-haiku-20240307": {
|
@@ -394,6 +441,7 @@ ANTHROPIC_MODELS = {
|
|
394
441
|
"max_output_tokens": 4096,
|
395
442
|
"function_call_available": True,
|
396
443
|
"response_format_available": True,
|
444
|
+
"native_multimodal": True,
|
397
445
|
},
|
398
446
|
"claude-3-5-sonnet-20240620": {
|
399
447
|
"id": "claude-3-5-sonnet-20240620",
|
@@ -401,6 +449,7 @@ ANTHROPIC_MODELS = {
|
|
401
449
|
"max_output_tokens": 4096,
|
402
450
|
"function_call_available": True,
|
403
451
|
"response_format_available": True,
|
452
|
+
"native_multimodal": True,
|
404
453
|
},
|
405
454
|
}
|
406
455
|
|
@@ -445,11 +494,13 @@ GEMINI_MODELS = {
|
|
445
494
|
"context_length": 1048576,
|
446
495
|
"function_call_available": True,
|
447
496
|
"response_format_available": True,
|
497
|
+
"native_multimodal": True,
|
448
498
|
},
|
449
499
|
"gemini-1.5-flash": {
|
450
500
|
"id": "gemini-1.5-flash",
|
451
501
|
"context_length": 1048576,
|
452
502
|
"function_call_available": True,
|
453
503
|
"response_format_available": True,
|
504
|
+
"native_multimodal": True,
|
454
505
|
},
|
455
506
|
}
|
vectorvein/types/enums.py
CHANGED
@@ -30,6 +30,7 @@ class ModelSetting(BaseModel):
|
|
30
30
|
endpoints: List[str] = Field(default_factory=list, description="Available endpoints for the model.")
|
31
31
|
function_call_available: bool = Field(False, description="Indicates if function call is available.")
|
32
32
|
response_format_available: bool = Field(False, description="Indicates if response format is available.")
|
33
|
+
native_multimodal: bool = Field(False, description="Indicates if the model is a native multimodal model.")
|
33
34
|
context_length: int = Field(32768, description="The context length for the model.")
|
34
35
|
max_output_tokens: Optional[int] = Field(None, description="Maximum number of output tokens allowed.")
|
35
36
|
|
@@ -1,8 +1,9 @@
|
|
1
|
-
vectorvein-0.1.
|
2
|
-
vectorvein-0.1.
|
1
|
+
vectorvein-0.1.15.dist-info/METADATA,sha256=3z3VVgOstft4qBbm9Nyb3GdyiiuSHbYGZnmPvD90CyM,502
|
2
|
+
vectorvein-0.1.15.dist-info/WHEEL,sha256=rSwsxJWe3vzyR5HCwjWXQruDgschpei4h_giTm0dJVE,90
|
3
3
|
vectorvein/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
4
|
-
vectorvein/chat_clients/__init__.py,sha256=
|
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=
|
21
|
-
vectorvein/types/defaults.py,sha256=
|
22
|
-
vectorvein/types/enums.py,sha256=
|
23
|
-
vectorvein/types/llm_parameters.py,sha256=
|
21
|
+
vectorvein/settings/__init__.py,sha256=jVHbhHn1BuMcyfZGXrxWKiI4NdY9wzvYyGMvKYmUtqg,3378
|
22
|
+
vectorvein/types/defaults.py,sha256=5VwX0M3nS3-IjZYamPYp3k1tutksG8-uo2TaJXvW9tw,15063
|
23
|
+
vectorvein/types/enums.py,sha256=PNK_pTIyjJFy-yAG2PHaMIO1ey3W6fReMCkH8M8VRW4,1595
|
24
|
+
vectorvein/types/llm_parameters.py,sha256=mmJjJZz4bPRi0nHzYNUNdWsQLHa9lbf3-MNVnU78vaY,3608
|
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.
|
27
|
+
vectorvein-0.1.15.dist-info/RECORD,,
|
File without changes
|