vectorvein 0.1.59__py3-none-any.whl → 0.1.60__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/anthropic_client.py +26 -1
- vectorvein/chat_clients/base_client.py +20 -3
- vectorvein/types/defaults.py +22 -0
- vectorvein/types/llm_parameters.py +1 -0
- {vectorvein-0.1.59.dist-info → vectorvein-0.1.60.dist-info}/METADATA +2 -2
- {vectorvein-0.1.59.dist-info → vectorvein-0.1.60.dist-info}/RECORD +8 -8
- {vectorvein-0.1.59.dist-info → vectorvein-0.1.60.dist-info}/WHEEL +0 -0
- {vectorvein-0.1.59.dist-info → vectorvein-0.1.60.dist-info}/entry_points.txt +0 -0
@@ -8,7 +8,14 @@ from typing import overload, Generator, AsyncGenerator, Any, Literal, Iterable
|
|
8
8
|
import httpx
|
9
9
|
from openai._types import NotGiven as OpenAINotGiven
|
10
10
|
from openai._types import NOT_GIVEN as OPENAI_NOT_GIVEN
|
11
|
-
from anthropic import
|
11
|
+
from anthropic import (
|
12
|
+
Anthropic,
|
13
|
+
AnthropicVertex,
|
14
|
+
AsyncAnthropic,
|
15
|
+
AsyncAnthropicVertex,
|
16
|
+
AnthropicBedrock,
|
17
|
+
AsyncAnthropicBedrock,
|
18
|
+
)
|
12
19
|
from anthropic._types import NOT_GIVEN
|
13
20
|
from anthropic.types import (
|
14
21
|
TextBlock,
|
@@ -219,6 +226,15 @@ class AnthropicChatClient(BaseChatClient):
|
|
219
226
|
access_token=self.creds.token,
|
220
227
|
http_client=self.http_client,
|
221
228
|
)
|
229
|
+
elif self.endpoint.is_bedrock:
|
230
|
+
if self.endpoint.credentials is None:
|
231
|
+
raise ValueError("Anthropic Bedrock endpoint requires credentials")
|
232
|
+
return AnthropicBedrock(
|
233
|
+
aws_access_key=self.endpoint.credentials.get("access_key"),
|
234
|
+
aws_secret_key=self.endpoint.credentials.get("secret_key"),
|
235
|
+
aws_region=self.endpoint.region,
|
236
|
+
http_client=self.http_client,
|
237
|
+
)
|
222
238
|
elif self.endpoint.api_schema_type == "default":
|
223
239
|
return Anthropic(
|
224
240
|
api_key=self.endpoint.api_key,
|
@@ -600,6 +616,15 @@ class AsyncAnthropicChatClient(BaseAsyncChatClient):
|
|
600
616
|
access_token=self.creds.token,
|
601
617
|
http_client=self.http_client,
|
602
618
|
)
|
619
|
+
elif self.endpoint.is_bedrock:
|
620
|
+
if self.endpoint.credentials is None:
|
621
|
+
raise ValueError("Anthropic Bedrock endpoint requires credentials")
|
622
|
+
return AsyncAnthropicBedrock(
|
623
|
+
aws_access_key=self.endpoint.credentials.get("aws_access_key"),
|
624
|
+
aws_secret_key=self.endpoint.credentials.get("aws_secret_key"),
|
625
|
+
aws_region=self.endpoint.region,
|
626
|
+
http_client=self.http_client,
|
627
|
+
)
|
603
628
|
elif self.endpoint.api_schema_type == "default":
|
604
629
|
return AsyncAnthropic(
|
605
630
|
api_key=self.endpoint.api_key,
|
@@ -6,7 +6,14 @@ from typing import Generator, AsyncGenerator, Any, overload, Literal, Iterable
|
|
6
6
|
|
7
7
|
import httpx
|
8
8
|
from openai import OpenAI, AsyncOpenAI, AzureOpenAI, AsyncAzureOpenAI
|
9
|
-
from anthropic import
|
9
|
+
from anthropic import (
|
10
|
+
Anthropic,
|
11
|
+
AnthropicVertex,
|
12
|
+
AsyncAnthropic,
|
13
|
+
AsyncAnthropicVertex,
|
14
|
+
AnthropicBedrock,
|
15
|
+
AsyncAnthropicBedrock,
|
16
|
+
)
|
10
17
|
|
11
18
|
from ..settings import settings
|
12
19
|
from ..types import defaults as defs
|
@@ -57,7 +64,9 @@ class BaseChatClient(ABC):
|
|
57
64
|
|
58
65
|
@cached_property
|
59
66
|
@abstractmethod
|
60
|
-
def raw_client(
|
67
|
+
def raw_client(
|
68
|
+
self,
|
69
|
+
) -> OpenAI | AzureOpenAI | Anthropic | AnthropicVertex | AnthropicBedrock | httpx.Client | None:
|
61
70
|
pass
|
62
71
|
|
63
72
|
@overload
|
@@ -199,7 +208,15 @@ class BaseAsyncChatClient(ABC):
|
|
199
208
|
@abstractmethod
|
200
209
|
def raw_client(
|
201
210
|
self,
|
202
|
-
) ->
|
211
|
+
) -> (
|
212
|
+
AsyncOpenAI
|
213
|
+
| AsyncAzureOpenAI
|
214
|
+
| AsyncAnthropic
|
215
|
+
| AsyncAnthropicVertex
|
216
|
+
| AsyncAnthropicBedrock
|
217
|
+
| httpx.AsyncClient
|
218
|
+
| None
|
219
|
+
):
|
203
220
|
pass
|
204
221
|
|
205
222
|
@overload
|
vectorvein/types/defaults.py
CHANGED
@@ -231,6 +231,20 @@ QWEN_MODELS: Final[Dict[str, Dict[str, Any]]] = {
|
|
231
231
|
"function_call_available": False,
|
232
232
|
"response_format_available": True,
|
233
233
|
},
|
234
|
+
"qwen2.5-coder-32b-instruct": {
|
235
|
+
"id": "qwen2.5-coder-32b-instruct",
|
236
|
+
"context_length": 30000,
|
237
|
+
"max_output_tokens": 4096,
|
238
|
+
"function_call_available": False,
|
239
|
+
"response_format_available": False,
|
240
|
+
},
|
241
|
+
"qwq-32b-preview": {
|
242
|
+
"id": "qwq-32b-preview",
|
243
|
+
"context_length": 30000,
|
244
|
+
"max_output_tokens": 4096,
|
245
|
+
"function_call_available": False,
|
246
|
+
"response_format_available": False,
|
247
|
+
},
|
234
248
|
"qwen2.5-72b-instruct": {
|
235
249
|
"id": "qwen2.5-72b-instruct",
|
236
250
|
"context_length": 131072,
|
@@ -238,6 +252,14 @@ QWEN_MODELS: Final[Dict[str, Dict[str, Any]]] = {
|
|
238
252
|
"function_call_available": False,
|
239
253
|
"response_format_available": True,
|
240
254
|
},
|
255
|
+
"qwen2-vl-72b-instruct": {
|
256
|
+
"id": "qwen2-vl-72b-instruct",
|
257
|
+
"context_length": 131072,
|
258
|
+
"max_output_tokens": 8192,
|
259
|
+
"function_call_available": False,
|
260
|
+
"response_format_available": False,
|
261
|
+
"native_multimodal": True,
|
262
|
+
},
|
241
263
|
"qwen-max": {
|
242
264
|
"id": "qwen-max",
|
243
265
|
"context_length": 8096,
|
@@ -37,6 +37,7 @@ class EndpointSetting(BaseModel):
|
|
37
37
|
credentials: Optional[dict] = Field(None, description="Additional credentials if needed.")
|
38
38
|
is_azure: bool = Field(False, description="Indicates if the endpoint is for Azure.")
|
39
39
|
is_vertex: bool = Field(False, description="Indicates if the endpoint is for Vertex.")
|
40
|
+
is_bedrock: bool = Field(False, description="Indicates if the endpoint is for Bedrock.")
|
40
41
|
rpm: int = Field(description="Requests per minute.", default=defs.ENDPOINT_RPM)
|
41
42
|
tpm: int = Field(description="Tokens per minute.", default=defs.ENDPOINT_TPM)
|
42
43
|
concurrent_requests: int = Field(
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: vectorvein
|
3
|
-
Version: 0.1.
|
3
|
+
Version: 0.1.60
|
4
4
|
Summary: VectorVein python SDK
|
5
5
|
Author-Email: Anderson <andersonby@163.com>
|
6
6
|
License: MIT
|
@@ -8,7 +8,7 @@ Requires-Python: >=3.10
|
|
8
8
|
Requires-Dist: openai>=1.37.1
|
9
9
|
Requires-Dist: tiktoken>=0.7.0
|
10
10
|
Requires-Dist: httpx>=0.27.0
|
11
|
-
Requires-Dist: anthropic[vertex]>=0.31.2
|
11
|
+
Requires-Dist: anthropic[bedrock,vertex]>=0.31.2
|
12
12
|
Requires-Dist: pydantic>=2.8.2
|
13
13
|
Requires-Dist: Pillow>=10.4.0
|
14
14
|
Requires-Dist: deepseek-tokenizer>=0.1.0
|
@@ -1,11 +1,11 @@
|
|
1
|
-
vectorvein-0.1.
|
2
|
-
vectorvein-0.1.
|
3
|
-
vectorvein-0.1.
|
1
|
+
vectorvein-0.1.60.dist-info/METADATA,sha256=9sn4JZD9LHRhNtLZTkHeLuqZwcrBwnDZxV3ZKIKMSCY,641
|
2
|
+
vectorvein-0.1.60.dist-info/WHEEL,sha256=thaaA2w1JzcGC48WYufAs8nrYZjJm8LqNfnXFOFyCC4,90
|
3
|
+
vectorvein-0.1.60.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=Oev7Lv1DIEWCMD-2Pm7e2cwzX7JFQTnIK-j6o4iUuyQ,17725
|
6
|
-
vectorvein/chat_clients/anthropic_client.py,sha256=
|
6
|
+
vectorvein/chat_clients/anthropic_client.py,sha256=ez1XVWxyEMpMxy1dkhkXzIorCwah1fd83edBI5s5aao,38464
|
7
7
|
vectorvein/chat_clients/baichuan_client.py,sha256=CVMvpgjdrZGv0BWnTOBD-f2ufZ3wq3496wqukumsAr4,526
|
8
|
-
vectorvein/chat_clients/base_client.py,sha256=
|
8
|
+
vectorvein/chat_clients/base_client.py,sha256=tmD3ai6YjQnCKHuPsUww1khRlJeJ2AJzYubksb-2UaM,10489
|
9
9
|
vectorvein/chat_clients/deepseek_client.py,sha256=3qWu01NlJAP2N-Ff62d5-CZXZitlizE1fzb20LNetig,526
|
10
10
|
vectorvein/chat_clients/gemini_client.py,sha256=e7xZdZm0-W2iXy3S-J5b1bO9YqhGxcv0Y5HPYcQnDds,21098
|
11
11
|
vectorvein/chat_clients/groq_client.py,sha256=Uow4pgdmFi93ZQSoOol2-0PhhqkW-S0XuSldvppz5U4,498
|
@@ -26,11 +26,11 @@ vectorvein/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
26
26
|
vectorvein/server/token_server.py,sha256=36F9PKSNOX8ZtYBXY_l-76GQTpUSmQ2Y8EMy1H7wtdQ,1353
|
27
27
|
vectorvein/settings/__init__.py,sha256=g01y74x0k2JEAqNpRGG0PDs0NTULjOAZV6HRhydPX1c,3874
|
28
28
|
vectorvein/settings/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
29
|
-
vectorvein/types/defaults.py,sha256=
|
29
|
+
vectorvein/types/defaults.py,sha256=Hb9BFNJIRJcwjePsQTKKihHqJGeJGbFHfNeV_pIV8gM,24479
|
30
30
|
vectorvein/types/enums.py,sha256=7KTJSVtQueImmbr1fSwv3rQVtc0RyMWXJmoE2tDOaso,1667
|
31
31
|
vectorvein/types/exception.py,sha256=gnW4GnJ76jND6UGnodk9xmqkcbeS7Cz2rvncA2HpD5E,69
|
32
|
-
vectorvein/types/llm_parameters.py,sha256=
|
32
|
+
vectorvein/types/llm_parameters.py,sha256=Q1mBJPMF7pzFQw1G9ut9RgRPGUEYmY5Kvb7CSYurZQ8,5350
|
33
33
|
vectorvein/types/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
34
34
|
vectorvein/utilities/media_processing.py,sha256=CTRq-lGlFkFgP_FSRhNwF_qUgmOrXPf2_1Ok9HY42_g,5887
|
35
35
|
vectorvein/utilities/retry.py,sha256=6KFS9R2HdhqM3_9jkjD4F36ZSpEx2YNFGOVlpOsUetM,2208
|
36
|
-
vectorvein-0.1.
|
36
|
+
vectorvein-0.1.60.dist-info/RECORD,,
|
File without changes
|
File without changes
|